diff --git a/src/test/java/inf112/fiasko/roborally/objects/PhaseTest.java b/src/test/java/inf112/fiasko/roborally/objects/PhaseTest.java index 92cb7eb..ed9ae08 100644 --- a/src/test/java/inf112/fiasko/roborally/objects/PhaseTest.java +++ b/src/test/java/inf112/fiasko/roborally/objects/PhaseTest.java @@ -475,4 +475,18 @@ public class PhaseTest { assertTrue(board.isRobotAlive(RobotID.ROBOT_1)); assertEquals(RobotID.ROBOT_1, board.getRobotOnPosition(new Position(0, 0))); } + + @Test + public void robotOnConveyorBeltFacingOutOfMapWithOneTileBetweenCanBeMoved() throws IOException, InterruptedException { + List robots = new ArrayList<>(); + List players = new ArrayList<>(); + robots.add(new Robot(RobotID.ROBOT_1, new Position(10, 10))); + players.add(new Player(RobotID.ROBOT_1, "Player 1")); + + Phase testPhase = createPhaseAndLoadBoard(players, robots); + testPhase.moveAllConveyorBelts(); + + assertTrue(board.isRobotAlive(RobotID.ROBOT_1)); + assertEquals(RobotID.ROBOT_1, board.getRobotOnPosition(new Position(10, 11))); + } }