Esempio n. 1
0
def play_round(game: GameWrapper):
    algo = GreedyBird(game)
    logger.critical('Starting Game')
    game.jump()
    while True:
        algo.tick()
        game.raise_game_status()
Esempio n. 2
0
def main():
    game = GameWrapper()
    while True:
        try:
            play_round(game)
        except GameOver as e:
            another_game = input('Game over.  Try again? [Y/N]')
            if another_game.upper() == 'Y':
                game.jump()
                continue
            else:
                raise e