Example #1
0
        public void MakePlayerMove()
        {
            Move moveToMake;

            if (ColorToPlay == PieceColor.White)
            {
                moveToMake = whitePlayer.DecideMove(Board, PieceColor.White);
            }
            else
            {
                moveToMake = blackPlayer.DecideMove(Board, PieceColor.Black);
            }
            var moveSnapshot = new MoveSnapshot()
            {
                Color          = ColorToPlay,
                EvaluatedScore = CurrentPlayer.CurrentScore,
                Move           = moveToMake,
                Moves          = new List <Move>(CurrentPlayer.PossibleMoves)
            };

            moveSnapshots.Add(moveSnapshot);
            Board = Board.PerformMove(moveToMake);
        }