Lager test for at en vegg stopper en robot å bli skubbet av brettet av et transportbånd

Co-Authored-By: torlunjen <torlunjen@users.noreply.github.com>
This commit is contained in:
GabrielMagnus 2020-04-23 10:50:02 +02:00
parent b121cae8b0
commit 7da8ba7a9c

View File

@ -461,4 +461,17 @@ public class PhaseTest {
assertFalse(board.isRobotAlive(RobotID.ROBOT_1));
assertNull(board.getRobotOnPosition(new Position(7, 0)));
}
@Test
public void robotOnConveyorBeltFacingOutOfMapMovesIntoWallIsBlocked() throws IOException, InterruptedException {
List<Robot> robots = new ArrayList<>();
List<Player> players = new ArrayList<>();
robots.add(new Robot(RobotID.ROBOT_1, new Position(0, 0)));
players.add(new Player(RobotID.ROBOT_1, "Player 1"));
Phase testPhase = createPhaseAndLoadBoard(players, robots);
testPhase.moveAllConveyorBelts();
assertNull(board.getRobotOnPosition(new Position(0, 0)));
}
}