Skip to content

nehalp13/TreasureHuntGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Treasure Hunt


Objective


Complete the functionality for the treasure hunt minigame within a team's game. The task is to complete the logic for after users decide if they want to search left or search right.

Features


  1. When the player chooses to go left, implement the following logic:

    • If the player is on an odd step: print "Encounter a hidden trap!" and decrease the player's health by 20.

    • If the player is on an even step: print "Found a secret shortcut!": Increase the player's score by 20.

  2. When the player chooses to go right, implement the following logic:

    • If the player is on an odd step: print "Discover hidden treasure!": Increase the player's score by 50.

    • If the player is on an even step: print "Encounter a wild creature!": Decrease the player's health by 30.

  3. When the player reaches 150 total points, then they've found the treasure.

    • print "Congratulations, treasure found!"

    • Adjust the while loop to exit the game once a player has won.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published