public Tuple <int, Move> Simulate(int depth) { var bestScore = int.MinValue; Move bestMove = null; foreach (var action in game.GetCurrentPlayer().GetPossibleActions(initialPlayer)) { var score = Simulate(action, depth); if (score > bestScore) { bestScore = score; bestMove = action; } } return(new Tuple <int, Move>(bestScore, bestMove)); }
public Simulation(Game game) { this.game = game;//.Copy(); initialScore = game.GetScore(); initialPlayer = game.GetCurrentPlayer(); }