Example #1
0
    def start(self):
        def reset_current_visible_pages():
            VisiblePage.objects.all().delete()
            for page in Page.objects.filter(initially_visible=True):
                VisiblePage(page=page).save()

        if self.current_game.state != CurrentGame.RUN:
            if self.current_game.state != CurrentGame.PAUSE:
                self.current_game.start_datetime = now()
                reset_current_visible_pages()
                MapEvent.delete_everything()
            self.current_game.state = CurrentGame.RUN
            self.current_game.save()
Example #2
0
    def start(self):
        def reset_current_visible_pages():
            VisiblePage.objects.all().delete()
            for page in Page.objects.filter(initially_visible=True):
                VisiblePage(page=page).save()

        if self.current_game.state != CurrentGame.RUN:
            if self.current_game.state != CurrentGame.PAUSE:
                self.current_game.start_datetime = now()
                reset_current_visible_pages()
                MapEvent.delete_everything()
            self.current_game.state = CurrentGame.RUN
            self.current_game.save()
Example #3
0
 def stop(self):
     self.current_game.state = CurrentGame.STOP
     self.current_game.save()
     MapEvent.delete_everything()
Example #4
0
 def stop(self):
     self.current_game.state = CurrentGame.STOP
     self.current_game.save()
     MapEvent.delete_everything()