Esempio n. 1
0
 /**
  * Tests the deleteRows method by setting up some combinations and testing whether the method
  * finds them.
  */
 @Test
 public final void testDeleteRows() {
   board = new Board(3, 0, 0, false);
   gems = board.getGems();
   gems[0][0].setType(1);
   gems[0][1].setType(1);
   gems[0][2].setType(1);
   assertTrue(board.deleteRows(gems[0][0]) > 0);
   gems[0][1].setType(2);
   gems[1][0].setType(2);
   gems[0][0].setType(1);
   assertTrue(board.deleteRows(gems[0][0]) == 0);
 }