@Test public void testClockwise() { Assert.assertEquals(WEST, MapTools.clockwise(SOUTH)); Assert.assertEquals(SOUTH, MapTools.clockwise(EAST)); Assert.assertEquals(NORTH, MapTools.clockwise(WEST)); Assert.assertEquals(EAST, MapTools.clockwise(NORTH)); }
@Test public void testNextForwardPositionNorth() { Coordinates position = MapTools.nextForwardPosition(new Coordinates(0, 0), NORTH); Assert.assertEquals(0, position.getX()); Assert.assertEquals(1, position.getY()); }
@Test public void testNextBackwardPositionWest() { Coordinates position = MapTools.nextBackwardPosition(new Coordinates(0, 0), WEST); Assert.assertEquals(1, position.getX()); Assert.assertEquals(0, position.getY()); }