Skip to content

Commit

Permalink
fix long code
Browse files Browse the repository at this point in the history
  • Loading branch information
BDadmehr0 committed Nov 24, 2024
1 parent 86e8bbb commit ca10541
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def show_help():
"- Or a penalty (losing a life)",
"Be careful, some boxes are cursed!",
"",
"Help - Page 4: The objective of the game is to navigate through the map, avoid enemies, and collect rewards.",
"Help - Page 4: Navigate the map, dodge enemies, and gather rewards.",
"Try to survive as long as possible and rack up your score!",
"Have fun playing!",
"",
Expand Down Expand Up @@ -452,21 +452,25 @@ def load_player_data():
if reward == "Extra Life":
player_lives += 1
print(
f"{FGColors.GREEN}You received an extra life! Lives: {player_lives}{FGColors.RESET}"
f"{FGColors.GREEN}Extra life! Lives: {player_lives}{FGColors.RESET}"
)
elif reward == "Score Boost":
score += 50
print(
f"{FGColors.GREEN}You received a score boost! Score: {score}{FGColors.RESET}"
f"{FGColors.GREEN}You received a score boost! "
f"Score: {score}{FGColors.RESET}"
)

elif reward == "Speed Boost":
# Improved player movement speed for a short time
speed_boost = True
elif reward == "Penalty":
player_lives -= 1
print(
f"{FGColors.RED}The box was cursed! You lost a life! Lives: {player_lives}{FGColors.RESET}"
f"{FGColors.RED}The box was cursed! You lost a life! "
f"Lives: {player_lives}{FGColors.RESET}"
)

else:
print(f"{FGColors.YELLOW}The box was empty!{FGColors.RESET}")
time.sleep(0.5)
Expand Down

0 comments on commit ca10541

Please sign in to comment.