Endrer fasenummer tilbake til 1-5

This commit is contained in:
Kristian Knarvik 2020-03-25 13:38:33 +01:00
parent cdb489422d
commit 9bda8244dd

View File

@ -171,11 +171,11 @@ public class RoboRallyGame implements IDrawableGame {
*/ */
private void runGameLoop() throws InterruptedException { private void runGameLoop() throws InterruptedException {
TimeUnit.SECONDS.sleep(3); TimeUnit.SECONDS.sleep(3);
runPhase(0);
runPhase(1); runPhase(1);
runPhase(2); runPhase(2);
runPhase(3); runPhase(3);
runPhase(4); runPhase(4);
runPhase(5);
} }
/** /**
@ -356,7 +356,7 @@ public class RoboRallyGame implements IDrawableGame {
for (Player player : playerList) { for (Player player : playerList) {
List<ProgrammingCard> playerProgram = player.getProgram(); List<ProgrammingCard> playerProgram = player.getProgram();
if (!playerProgram.isEmpty()) { if (!playerProgram.isEmpty()) {
ProgrammingCard programmingCard = playerProgram.get(phase-1); ProgrammingCard programmingCard = playerProgram.get(phase - 1);
originalPriority.add(programmingCard.getPriority()); originalPriority.add(programmingCard.getPriority());
robotsToDoAction.add(player.getRobotID()); robotsToDoAction.add(player.getRobotID());
programToBeRun.add(programmingCard); programToBeRun.add(programmingCard);