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()
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())