Esempio n. 1
0
  @Test
  public void testIsFull() {
    Board board = new Board();

    // Board is empty
    assertFalse(board.isFull());

    // Fill the board with moves
    for (int i = 0; i < 9; i++) {
      board.addMove(i, true);
    }

    // Board is full
    assertTrue(board.isFull());
  }
Esempio n. 2
0
 @Test
 public void testIfBoardIsFull() {
   Board testBoard = new Board();
   testBoard.mark(0, 0, 'x');
   testBoard.mark(0, 1, 'x');
   testBoard.mark(0, 2, 'x');
   testBoard.mark(1, 0, 'x');
   testBoard.mark(1, 1, 'x');
   testBoard.mark(1, 2, 'x');
   testBoard.mark(2, 0, 'x');
   testBoard.mark(2, 1, 'x');
   testBoard.mark(2, 2, 'x');
   assertEquals(true, testBoard.isFull());
 }
Esempio n. 3
0
 @Test
 public void testIfBoardIsFull2() {
   Board testBoard = new Board();
   assertEquals(false, testBoard.isFull());
 }