public void InvariantTests0() { TTTBoard board = new TTTBoard(3); List <int[]> squares = board.GetEmptySquares(); int count = squares.Count; Assert.AreEqual(9, count, "Empty squares"); }
public void TTboardClone() { TTTBoard board = new TTTBoard(3); TTTBoard newBoard = board.Clone(); board.Move(0, 0, Player.PLAYERX); board.Move(0, 1, Player.PLAYERO); int emptyBoard = board.GetEmptySquares().Count; int emptyNewBoard = newBoard.GetEmptySquares().Count; Assert.AreNotEqual(emptyNewBoard, emptyBoard, "Bad clone"); }