public void GameBoardToStringSixBySix() { int gameBoardSize = 6; var target = new GameBoard(gameBoardSize); string expected = " 1 16 17 18 19 20\r\n 15 2 27 28 29 21\r\n 14 31 3 26 30 22\r\n 13 36 32 4 25 23\r\n 12 35 34 33 5 24\r\n 11 10 9 8 7 6\r\n"; Engine engine = new Engine(gameBoardSize); var result = engine.Run(); Assert.AreEqual(expected, result); }
public Form1() { InitializeComponent(); gb = new GameBoard(); }
public void GameBoardFindEmptyCellAllEmpty() { int gameBoardSize = 6; GameBoard target = new GameBoard(gameBoardSize); Tuple<int, int> expected = new Tuple<int, int>(0, 0); Tuple<int, int> actual = target.FindEmptyCell(); Assert.AreEqual(expected, actual); }
public void GameBoardToStringTwoByTwo() { int gameBoardSize = 2; var target = new GameBoard(gameBoardSize); string expected = " 1 4\r\n 3 2\r\n"; Engine engine = new Engine(gameBoardSize); var result = engine.Run(); Assert.AreEqual(expected, result); }
public void GameBoardConstructorInvalidSizeOverOneHundred() { int gameBoardSize = 101; var target = new GameBoard(gameBoardSize); }
public void GameBoardConstructorInvalidSizeZero() { int gameBoardSize = 0; var target = new GameBoard(gameBoardSize); }
public void GameBoardConstructorInvalidSizeNegative() { var target = new GameBoard(-20); }
public void GameBoardConstructorTwentyByTwenty() { int gameBoardSize = 20; var target = new GameBoard(gameBoardSize); Assert.AreEqual(gameBoardSize, target.Board.GetLength(0)); }
public void GameBoardConstructorSixBySix() { int gameBoardSize = 6; var target = new GameBoard(gameBoardSize); Assert.AreEqual(gameBoardSize, target.Board.GetLength(0)); }
public void GameBoardChangeDirectionCurrentDownAndRight() { int gameBoardSize = 6; GameBoard target = new GameBoard(gameBoardSize); int currentDirectionX = 1; int currentDirectionY = 1; Tuple<int, int> expected = new Tuple<int, int>(1, 0); Tuple<int, int> actual = target.ChangeDirection(currentDirectionX, currentDirectionY); Assert.AreEqual(expected, actual); }
public void GameBoardCellContent() { int gameBoardSize = 6; GameBoard target = new GameBoard(gameBoardSize); int expected = 0; int actual = target.Board[0, 0]; Assert.AreEqual(expected, actual); }