Пример #1
0
        private void AddPlayerInputToBoard(Player currentPlayer)
        {
            var validPosition = false;

            while (!validPosition)
            {
                var position = currentPlayer.GetPlayerInput();
                validPosition = Board.PositionOnBoardIsEmpty(position);
                if (validPosition)
                {
                    Board.ChangeCurrentBoard(position, currentPlayer.PlayerSymbol);
                }
                else
                {
                    Console.WriteLine("Oh no, a piece is already at this place! Try again...");
                }
            }
        }