Esempio n. 1
0
        private static void PlayCurrentTurn()
        {
            CurrentBoard board    = new CurrentBoard();
            var          newBoard = board.ChangeCurrentBoard(CurrentBoard, Letter, Row, Column);

            do
            {
                if (CurrentBoard != newBoard)
                {
                    CurrentBoard = newBoard;
                    ReturnCurrentBoard();
                    continue;
                }
                Console.WriteLine("Oh no, a piece is already at this place! Try again...");
            } while (false);
        }
Esempio n. 2
0
        public void ReturnTheCorrectPositionOfInputIfMoveIsValid(string expectedBoard, char letter, int row, int column)
        {
            var actualBoard = game.ChangeCurrentBoard(currentBoard, letter, row - 1, column - 1);

            Assert.AreEqual(actualBoard, expectedBoard);
        }