This Python program implements a simple text-based Treasure Hunt game where the player enters the "Kingdom of Dragons" and must choose between two caves, one containing a friendly dragon with treasure and the other a hungry dragon that will devour them. The objective is to choose the right cave and win the game.
- The player is presented with an introduction to the Kingdom of Dragons and two cave options.
- The player is prompted to enter their choice: cave 1 or cave 2.
- If the player chooses the correct cave (randomly determined to be either 1 or 2), they win and are rewarded with the dragon's treasure.
- If the player chooses the wrong cave, they lose and face the hungry dragon.
- After the game outcome is revealed, the player is given the option to play again.
To play the game, simply run the Python script. Follow the on-screen instructions to choose a cave and see if you can outsmart the dragons.
- Randomly generated dragon caves to add an element of surprise.
- User-friendly interface with clear instructions.
- Option to play the game multiple times.
- Make sure you have Python installed on your system.
- Download the
treasure_hunt.py
file. - Open a terminal or command prompt.
- Navigate to the directory where
treasure_hunt.py
is located. - Run the game by executing the command:
python treasure_hunt.py
.
Have fun playing and enjoy the adventure in the Kingdom of Dragons!
For more Python projects and tutorials, visit my GitHub profile: https://github.com/nisal2002