Making Choices
Branch the story.
Choose Your Path! 🌿
The BEST part of an adventure game: choices! Go left or right? Open the door or run? Let us make the story branch! 🛤️
A Simple Choice 🤔
Store the player choice in a variable, then react to it with if.
let choice = "left"
if (choice === "left") {
console.log("You go left into a sunny meadow! 🌼")
}All lessons in this course
- Planning the Adventure
- Making Choices
- Winning
- Game Over