public void CanNotMoveOpponent() { TicTacToeVariant ticTacToe = new TicTacToeVariant(); ticTacToe.Place(1, 1); ticTacToe.Move(1, 1, 2, 2); char[,] reference = { { ' ', ' ', ' ' }, { ' ', 'X', ' ' }, { ' ', ' ', ' ' }, }; CollectionAssert.AreEqual(reference, ticTacToe.GameBoard); }
public void CanMove() { TicTacToeVariant ticTacToe = new TicTacToeVariant(); char[,] check = { { 'X', ' ', ' ' }, { ' ', ' ', 'X' }, { 'X', ' ', ' ' }, }; char[,] reference = { { ' ', ' ', ' ' }, { ' ', 'X', 'X' }, { 'X', ' ', ' ' }, }; ticTacToe.GameBoard = check; ticTacToe.Move(0, 0, 1, 1); CollectionAssert.AreEqual(reference, ticTacToe.GameBoard); }
public void TicTacToeNoMoreThan3() { TicTacToeVariant ticTacToe = new TicTacToeVariant(); char[,] check = { { 'X', ' ', ' ' }, { ' ', ' ', 'X' }, { 'X', ' ', ' ' }, }; char[,] reference = { { 'X', ' ', ' ' }, { ' ', ' ', 'X' }, { 'X', ' ', ' ' }, }; ticTacToe.GameBoard = check; ticTacToe.Place(1, 1); CollectionAssert.AreEqual(reference, ticTacToe.GameBoard); }