Make your own "Choose Your Own Adventure" game. Use conditionals such as if
, else
, and elif
statements to lay out the logic and the story's path in your program.
To write your code according to my story, you can use this flow chart from draw.io to help you.
However, I think the fun part is writing your own story 😊
🧞♂️ 🐊 🧙♂️ 🧟 🧚♂️ 🧝♂️ 🥷 🤖 👽 🙀
That said if you'd like to continue with my example, feel free to use the text snippets below...
- 'You've arrived to the road less travelled, which direction would you choose, Left or Right? Type "left" or "right"'
- 'You've come to a river. There is an island in the middle of the lake. Type "wait" to wait for a boat. Type "swim" to swim across.'
- "You arrive at the island unharmed. There is a house with 3 doors. One red, one yellow and one blue. Which colour do you choose?"
- "It's a room full of fire. Game Over."
- "You found the treasure! You Win!"
- "You enter a room of beasts. Game Over."
- "You chose a door that doesn't exist. Game Over."
- "You get attacked by a dragon. Game Over."
- "You fell into a hole. Game Over."