@Test public void testMove() { q_w.move(4, 0); assertTrue(q_w.getX() == 4 && q_w.getY() == 0); p1_b.move(6, 3); assertFalse(p1_b.getX() == 6 && p1_b.getY() == 3); board.print(); }
@Test public void testCanGoTo() { assertTrue(p1_b.canGoTo(6, 3)); assertFalse(p1_b.canGoTo(8, 7)); }
@Test public void testCanMoveTo() { assertTrue(p1_b.canMoveTo(6, 3)); }
@Test public void testCanEatAt() { assertTrue(q_w.canEatAt(4, 0)); assertFalse(p1_b.canEatAt(7, 2)); }
@Test public void testGetY() { assertTrue(bs_w.getY() == 5); assertTrue(p1.getY() == 4); assertTrue(p1_b.getY() == 2); }
@Test public void testGetX() { assertTrue(bs_w.getX() == 7); assertTrue(p1.getX() == 7); assertTrue(p1_b.getX() == 6); }
@Test public void testGetType() { assertTrue(bs_w.getType() == ChessBoard.WHITE); assertTrue(p1.getType() == ChessBoard.WHITE); assertTrue(p1_b.getType() == ChessBoard.BLACK); }