mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Flytter litt på soving i fase for en bedre brukeropplevelse
This commit is contained in:
parent
17a3d4f27a
commit
72b47619c9
@ -50,6 +50,7 @@ public class Phase {
|
|||||||
* @throws InterruptedException If interrupted wile trying to sleep
|
* @throws InterruptedException If interrupted wile trying to sleep
|
||||||
*/
|
*/
|
||||||
public void runPhase(int phaseNumber) throws InterruptedException {
|
public void runPhase(int phaseNumber) throws InterruptedException {
|
||||||
|
sleep();
|
||||||
runProgrammingCards(phaseNumber);
|
runProgrammingCards(phaseNumber);
|
||||||
|
|
||||||
moveAllConveyorBelts();
|
moveAllConveyorBelts();
|
||||||
@ -83,6 +84,7 @@ public class Phase {
|
|||||||
* @throws InterruptedException If it gets interrupted while trying to sleep
|
* @throws InterruptedException If it gets interrupted while trying to sleep
|
||||||
*/
|
*/
|
||||||
public void fireAllLasers() throws InterruptedException {
|
public void fireAllLasers() throws InterruptedException {
|
||||||
|
sleep();
|
||||||
gameBoard.fireAllLasers();
|
gameBoard.fireAllLasers();
|
||||||
sleep();
|
sleep();
|
||||||
gameBoard.doLaserCleanup();
|
gameBoard.doLaserCleanup();
|
||||||
@ -121,11 +123,11 @@ public class Phase {
|
|||||||
* @throws InterruptedException If interrupted while sleeping.
|
* @throws InterruptedException If interrupted while sleeping.
|
||||||
*/
|
*/
|
||||||
public void rotateCogwheels() throws InterruptedException {
|
public void rotateCogwheels() throws InterruptedException {
|
||||||
|
sleep();
|
||||||
for (BoardElementContainer<Tile> cogwheel : cogwheels) {
|
for (BoardElementContainer<Tile> cogwheel : cogwheels) {
|
||||||
if (!gameBoard.hasRobotOnPosition(cogwheel.getPosition())) {
|
if (!gameBoard.hasRobotOnPosition(cogwheel.getPosition())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
sleep();
|
|
||||||
if (cogwheel.getElement().getTileType() == TileType.COGWHEEL_RIGHT) {
|
if (cogwheel.getElement().getTileType() == TileType.COGWHEEL_RIGHT) {
|
||||||
gameBoard.rotateRobotRight(gameBoard.getRobotOnPosition(cogwheel.getPosition()));
|
gameBoard.rotateRobotRight(gameBoard.getRobotOnPosition(cogwheel.getPosition()));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user