Menu key handler moved

This commit is contained in:
Yohann D'ANELLO 2020-11-19 01:32:52 +01:00
parent 80ae824ed8
commit a51ca5dbe3
1 changed files with 4 additions and 0 deletions

View File

@ -102,6 +102,10 @@ class Game:
if key == KeyValues.ENTER:
option = self.main_menu.validate()
if option == menus.MainMenuValues.START:
self.new_game()
self.display_actions(DisplayActions.UPDATE)
self.state = GameMode.PLAY
if option == menus.MainMenuValues.RESUME:
self.state = GameMode.PLAY
elif option == menus.MainMenuValues.SAVE:
self.save_game()