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.
-
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.
-
-
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.
-
-
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.
-