made a board that is used for testing respawning

This commit is contained in:
Tobydrama 2020-04-30 14:37:03 +02:00
parent b02e665e86
commit 54c1a9d485

View File

@ -234,7 +234,9 @@ public class BoardTest {
public void flagGetsUpdatedOnRobotWithCorrectLastVisitedFlag() { public void flagGetsUpdatedOnRobotWithCorrectLastVisitedFlag() {
Robot testRobot = robotList.get(6); Robot testRobot = robotList.get(6);
assertEquals(0, testRobot.getLastFlagVisited()); assertEquals(0, testRobot.getLastFlagVisited());
board.updateRobotFlag(RobotID.ROBOT_7, TileType.FLAG_1); BoardElementContainer<Tile> flag = new BoardElementContainer<>(new Tile(TileType.FLAG_1,Direction.NORTH)
,new Position(1,1));
board.updateRobotFlag(RobotID.ROBOT_7, flag);
assertEquals(1, testRobot.getLastFlagVisited()); assertEquals(1, testRobot.getLastFlagVisited());
} }
@ -242,7 +244,9 @@ public class BoardTest {
public void flagDoesNotUpdatedOnRobotWithWrongLastVisitedFlag() { public void flagDoesNotUpdatedOnRobotWithWrongLastVisitedFlag() {
Robot testRobot = robotList.get(6); Robot testRobot = robotList.get(6);
assertEquals(0, testRobot.getLastFlagVisited()); assertEquals(0, testRobot.getLastFlagVisited());
board.updateRobotFlag(RobotID.ROBOT_7, TileType.FLAG_2); BoardElementContainer<Tile> flag = new BoardElementContainer<>(new Tile(TileType.FLAG_2,Direction.NORTH)
,new Position(1,1));
board.updateRobotFlag(RobotID.ROBOT_7, flag);
assertEquals(0, testRobot.getLastFlagVisited()); assertEquals(0, testRobot.getLastFlagVisited());
} }