Skip to content

Commit

Permalink
stupid fixes 3
Browse files Browse the repository at this point in the history
  • Loading branch information
pritam-dey3 committed Jul 18, 2021
1 parent a010bab commit 3368968
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions game.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def run(self) -> None:
val = Keystroke()
continue
elif command == PAUSE:
self.current_scene.reset()
self.current_scene = self.pause
continue
elif command == PLAY:
Expand All @@ -132,6 +133,7 @@ def run(self) -> None:
self.current_scene = self.leaderboard
continue
elif command == TUTORIAL:
self.current_scene.reset()
self.current_scene = self.tutorial
continue
elif command == END:
Expand Down
4 changes: 3 additions & 1 deletion levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,12 +704,14 @@ def pause_menu_action(choice: str) -> Union[int, None]:
return PLAY
elif choice == "Quit":
return QUIT
elif choice == "Main menu":
return TITLE
return None


pause_menu = Menu(
txt=["Game Paused", ""],
choices=["Return", "Quit"],
choices=["Return", "Main menu", "Quit"],
action_on_choice=pause_menu_action,
)

Expand Down

0 comments on commit 3368968

Please sign in to comment.