mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
made a board that is used for testing respawning
This commit is contained in:
parent
b02e665e86
commit
54c1a9d485
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user