def update(self, time_passed): self.states.update(time_passed) world = self.states.get_world() if world: if world.game_over: score_board = ScoreBoard() score_board.add_option('Clear Scores', score_board.clear_scores) score_board.add_option('Back', self.states.pop) score_board.check_score(world.score, world.current_level) self.states.states = [] self.enable_main_menu() self.states.push(score_board)
def enable_score_board(self): score_board = ScoreBoard() score_board.add_option('Clear Scores', score_board.clear_scores) score_board.add_option('Back', self.states.pop) self.states.push(score_board)