mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 15:19:35 +01:00
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:
parent
b121cae8b0
commit
7da8ba7a9c
@ -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)));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user