Пример #1
0
 @Test
 public void testAdjacency15() {
   board.calcAdjacencies();
   LinkedList testList = board.getAdjList(15);
   Assert.assertTrue(testList.contains(14));
   Assert.assertTrue(testList.contains(11));
   Assert.assertEquals(2, testList.size());
 }
Пример #2
0
 @Test
 public void testAdjacency8() {
   board.calcAdjacencies();
   LinkedList testList = board.getAdjList(8);
   Assert.assertTrue(testList.contains(9));
   Assert.assertTrue(testList.contains(4));
   Assert.assertTrue(testList.contains(12));
   Assert.assertEquals(3, testList.size());
 }
Пример #3
0
 @Test
 public void testTargets12_2() {
   board.calcAdjacencies();
   board.calcTargets(12, 2);
   Set<Integer> targets = board.getTargets();
   Assert.assertEquals(3, targets.size());
   Assert.assertTrue(targets.contains(4));
   Assert.assertTrue(targets.contains(9));
   Assert.assertTrue(targets.contains(14));
 }
Пример #4
0
 @Test
 public void testTargets10_1() {
   board.calcAdjacencies();
   board.calcTargets(10, 1);
   Set<Integer> targets = board.getTargets();
   Assert.assertEquals(4, targets.size());
   Assert.assertTrue(targets.contains(11));
   Assert.assertTrue(targets.contains(9));
   Assert.assertTrue(targets.contains(6));
   Assert.assertTrue(targets.contains(14));
 }
Пример #5
0
 @Test
 public void testTargets2_2() {
   board.calcAdjacencies();
   board.calcTargets(2, 2);
   Set<Integer> targets = board.getTargets();
   Assert.assertEquals(4, targets.size());
   Assert.assertTrue(targets.contains(0));
   Assert.assertTrue(targets.contains(5));
   Assert.assertTrue(targets.contains(10));
   Assert.assertTrue(targets.contains(7));
 }
Пример #6
0
 @Test
 public void testTargets4_3() {
   board.calcAdjacencies();
   board.calcTargets(4, 3);
   Set<Integer> targets = board.getTargets();
   Assert.assertTrue(targets.contains(2));
   Assert.assertTrue(targets.contains(7));
   Assert.assertTrue(targets.contains(10));
   Assert.assertTrue(targets.contains(13));
   Assert.assertTrue(targets.contains(0));
   Assert.assertTrue(targets.contains(5));
   Assert.assertTrue(targets.contains(8));
 }
Пример #7
0
 // Test Targets
 @Test
 public void testTargets0_3() {
   board.calcAdjacencies();
   board.calcTargets(0, 3);
   Set<Integer> targets = board.getTargets();
   Assert.assertEquals(6, targets.size());
   Assert.assertTrue(targets.contains(12));
   Assert.assertTrue(targets.contains(9));
   Assert.assertTrue(targets.contains(1));
   Assert.assertTrue(targets.contains(6));
   Assert.assertTrue(targets.contains(3));
   Assert.assertTrue(targets.contains(4));
 }
Пример #8
0
 @Before
 public void init() {
   IntBoard board = new IntBoard();
   board.calcAdjacencies();
 }