예제 #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();
 }