Lager test for å se om en robot kan bli flyttet av transportbånd når den står med en tile mellom seg og utenfor brettet

This commit is contained in:
GabrielMagnus 2020-04-23 11:32:53 +02:00
parent 76b89f81d9
commit a0cd4baa44

View File

@ -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<Robot> robots = new ArrayList<>();
List<Player> 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)));
}
}