public void EmptyBoard_GameIsNotOver() { GameRules rules = new TicTacToeRules(); GameBoard board = new TicTacToeBoard(); var result = rules.IsWinningMove(board); Assert.Equal(false, result); }
public void FirstLine_NotFull_GameNotOver() { GameRules rules = new TicTacToeRules(); GameBoard board = new TicTacToeBoard(); board.Place(0, "X"); board.Place(2, "X"); var result = rules.IsWinningMove(board); Assert.Equal(false, result); }
public void FirstColumn_GameIsOver() { GameRules rules = new TicTacToeRules(); GameBoard board = new TicTacToeBoard(); board.Place(0, "X"); board.Place(3, "X"); board.Place(6, "X"); var result = rules.IsWinningMove(board); Assert.Equal(true, result); }
public void ThirdLine_GameIsOver() { GameRules rules = new TicTacToeRules(); GameBoard board = new TicTacToeBoard(); board.Place(6, "X"); board.Place(7, "X"); board.Place(8, "X"); var result = rules.IsWinningMove(board); Assert.Equal(true, result); }
public void RightDiagonal_GameIsOver() { GameRules rules = new TicTacToeRules(); GameBoard board = new TicTacToeBoard(); board.Place(2, "X"); board.Place(4, "X"); board.Place(6, "X"); var result = rules.IsWinningMove(board); Assert.Equal(true, result); }