示例#1
0
    def simulate_random_game(game: GameState):
        bots = {Player.black: RandomBot(), Player.white: RandomBot()}

        while (not game.is_over()):
            bot_move = bots[game.next_player].select_move(game)
            game = game.apply_move(bot_move)
        return game.winner()
示例#2
0
 def simulate_random_game(game: GameState) -> Player:
     bots = {
         Player.black: FastRandomAgent(),
         Player.white: FastRandomAgent(),
     }
     while not game.is_over():
         bot_move = bots[game.next_player].select_move(game)
         game = game.apply_move(bot_move)
     return cast(Player, game.winner())