@Test public void cardNotAdjacentUpperLeft() { Card dodo = CardList.getCard("Dodo"); DeployedCard middle = new DeployedCard(dodo, 1, 1); DeployedCard upperLeft = new DeployedCard(dodo, 0, 0); assertFalse(middle.cardAdjacent(upperLeft)); assertFalse(upperLeft.cardAdjacent(middle)); }
@Test public void cardAdjacentAbove() { Card dodo = CardList.getCard("Dodo"); DeployedCard middle = new DeployedCard(dodo, 1, 1); DeployedCard above = new DeployedCard(dodo, 0, 1); assertTrue(middle.cardAdjacent(above)); assertTrue(above.cardAdjacent(middle)); }
@Test public void cardAdjacentLeft() { Card dodo = CardList.getCard("Dodo"); DeployedCard middle = new DeployedCard(dodo, 1, 1); DeployedCard left = new DeployedCard(dodo, 1, 0); assertTrue(middle.cardAdjacent(left)); assertTrue(left.cardAdjacent(middle)); }
@Test public void cardNotAdjacentLowerRight() { Card dodo = CardList.getCard("Dodo"); DeployedCard middle = new DeployedCard(dodo, 1, 1); DeployedCard lowerRight = new DeployedCard(dodo, 2, 2); assertFalse(middle.cardAdjacent(lowerRight)); assertFalse(lowerRight.cardAdjacent(middle)); }