public void UnhighlightMove(Move move)
 {
     Tile source = Board.GetTile(move.Source);
     source.IsHighlighted = false;
     Tile target = Board.GetTile(move.Target);
     target.IsHighlighted = false;
 }
Exemple #2
0
        private int EvaluateMove(Move move, int alpha = -10000, int beta = 10000)
        {
            int penguin = move.Penguin;
            Position source = move.Source;
            Position target = move.Target;

            // Play the move.
            int fish = Fish[target.Row][target.Column];
            Score += fish;
            Fish[target.Row][target.Column] = 0;
            Blue[penguin] = target;

            SwapSides();
            int score = -Solve(-beta, -alpha);
            SwapSides();

            // Undo the move.
            Blue[penguin] = source;
            Fish[target.Row][target.Column] = fish;
            Score -= fish;

            return score;
        }