This commit is contained in:
2020-02-25 17:00:22 +01:00
5 changed files with 146 additions and 3 deletions

View File

@ -94,4 +94,12 @@ public class BoardTest {
robotList.add(robot);
new Board(tileGrid, wallGrid, robotList);
}
@Test
public void killRobotReducesAmountOfLivesByOne () {
Robot robot = board.getAliveRobots().get(0);
for (int i = 0; i < 3; i++) {
board.moveRobot(robot.getRobotId(), Direction.SOUTH);
}
assertEquals(2, robot.getAmountOfLives());
}
}