Fixed crash on last level

main
Skyball2000 2023-03-29 16:29:46 +02:00
parent 017ff1f860
commit 39b8b0e92c
1 changed files with 5 additions and 1 deletions

View File

@ -105,7 +105,11 @@ class MainLoop:
def player_success(self, level: Level):
next_level = self.parsed_levels_manager.find_next_level(level)
self.select_level(next_level)
if next_level is not None:
self.select_level(next_level)
else:
print('WINNNNNN!!')
self.select_main_menu()
def select_main_menu(self):
self.set_game_state(self.GAME_STATE_MENU)