예제 #1
0
 public static void ShowFullInfoBoard(IMoveResult moveResult)
 {
     DisplaySmashed(moveResult.AllSmashedFigures(), TeamColor.White);
     Console.WriteLine();
     DisplaySmashed(moveResult.AllSmashedFigures(), TeamColor.Black);
     ShowBoard(moveResult.GetBoard());
 }
        private void ComputerMove(IMoveResult moveResult)
        {
            if (moveResult.IsCheckMate(_computer.MyTeamColor))
            {
                Console.WriteLine("\n \n \n \n");
                Console.WriteLine($"Player {_player.Name} wins!");
                return;
            }

            Console.WriteLine($"==================== Computer - {_computer.MyTeamColor} =====================");
            var nextMove = _computer.NextMove(moveResult.GetBoard());

            moveResult = _gameConductor.DoMove(nextMove.From, nextMove.Destination);

            Console.WriteLine($"Computer has moved the figure from the {nextMove.From} position to the {nextMove.Destination} position");
            PlayerMove(moveResult);
        }