From 72b47619c9e90bc10b02abc8c38d50f5cbe7d667 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Tue, 21 Apr 2020 10:45:02 +0200 Subject: [PATCH] =?UTF-8?q?Flytter=20litt=20p=C3=A5=20soving=20i=20fase=20?= =?UTF-8?q?for=20en=20bedre=20brukeropplevelse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/inf112/fiasko/roborally/objects/Phase.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/inf112/fiasko/roborally/objects/Phase.java b/src/main/java/inf112/fiasko/roborally/objects/Phase.java index f421407..5623ab3 100644 --- a/src/main/java/inf112/fiasko/roborally/objects/Phase.java +++ b/src/main/java/inf112/fiasko/roborally/objects/Phase.java @@ -50,6 +50,7 @@ public class Phase { * @throws InterruptedException If interrupted wile trying to sleep */ public void runPhase(int phaseNumber) throws InterruptedException { + sleep(); runProgrammingCards(phaseNumber); moveAllConveyorBelts(); @@ -83,6 +84,7 @@ public class Phase { * @throws InterruptedException If it gets interrupted while trying to sleep */ public void fireAllLasers() throws InterruptedException { + sleep(); gameBoard.fireAllLasers(); sleep(); gameBoard.doLaserCleanup(); @@ -121,11 +123,11 @@ public class Phase { * @throws InterruptedException If interrupted while sleeping. */ public void rotateCogwheels() throws InterruptedException { + sleep(); for (BoardElementContainer cogwheel : cogwheels) { if (!gameBoard.hasRobotOnPosition(cogwheel.getPosition())) { continue; } - sleep(); if (cogwheel.getElement().getTileType() == TileType.COGWHEEL_RIGHT) { gameBoard.rotateRobotRight(gameBoard.getRobotOnPosition(cogwheel.getPosition())); } else {