Ejemplo n.º 1
0
 @Test
 public void testFinishedOnGameWithWinner() {
   for (int i = 0; i < board.dimension; i++) {
     int[] cell = {i, 0};
     board.setCellValue(cell, 1);
   }
   assertTrue(GameState.finished(board));
 }
Ejemplo n.º 2
0
 @Test
 public void testFinishedOnFullBoard() {
   for (int i = 0; i < board.dimension; i++) {
     for (int j = 0; j < board.dimension; j++) {
       int[] cell = {i, j};
       board.setCellValue(cell, 1);
     }
   }
   assertTrue(GameState.finished(board));
 }
Ejemplo n.º 3
0
 @Test
 public void testFinished() {
   assertFalse(GameState.finished(board));
 }