예제 #1
0
    def autosave(self):
        if SESSION.is_active():
            timer = Timer(SETTINGS.get(Setting.AUTOSAVE_INTERVAL), self.autosave)
            timer.daemon = True
            timer.start()

            SESSION.save_game_to_file(autosave=True)
예제 #2
0
 def trigger_save_game(self, event):
     SESSION.save_game_to_file()