mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
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:
parent
76b89f81d9
commit
a0cd4baa44
@ -475,4 +475,18 @@ public class PhaseTest {
|
|||||||
assertTrue(board.isRobotAlive(RobotID.ROBOT_1));
|
assertTrue(board.isRobotAlive(RobotID.ROBOT_1));
|
||||||
assertEquals(RobotID.ROBOT_1, board.getRobotOnPosition(new Position(0, 0)));
|
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)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user