Exemplo n.º 1
0
 def on_quit(self) -> None:
     """handle exiting out of a finished game"""
     if os.path.exists("savegame.sav"):
         os.remove("savegame.sav")  # deletes the active save file
     raise exceptions.QuitWithoutSaving()  # avoid saving a finished game
Exemplo n.º 2
0
 def on_quit(self) -> None:
     """Handle exiting out of a finished game."""
     if os.path.exists("savegame.sav"):
         os.remove("savegame.sav")
     raise exceptions.QuitWithoutSaving()