Prøver å fikse en bug der brukeren entrer power down screen når den ikke skal

This commit is contained in:
Kristian Knarvik 2020-04-28 12:27:59 +02:00
parent 3924189839
commit 6d6d4e70bf
3 changed files with 1 additions and 8 deletions

View File

@ -25,10 +25,6 @@ public enum GameState {
* Indicates that the user is in the process of choosing cards * Indicates that the user is in the process of choosing cards
*/ */
CHOOSING_CARDS, CHOOSING_CARDS,
/**
* Indicates that the user is in the process of choosing whether to power down
*/
CHOOSING_POWER_DOWN,
/** /**
* Indicates that the user is in the process of choosing whether to stay in power down * Indicates that the user is in the process of choosing whether to stay in power down
*/ */

View File

@ -63,9 +63,6 @@ public class LoadingScreen extends AbstractScreen {
case EXITED: case EXITED:
roboRallyWrapper.quit("All players died. Cannot continue playing."); roboRallyWrapper.quit("All players died. Cannot continue playing.");
break; break;
case CHOOSING_POWER_DOWN:
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getPowerDownScreen(this.roboRallyWrapper));
break;
case SKIP_POWER_DOWN_SCREEN: case SKIP_POWER_DOWN_SCREEN:
roboRallyWrapper.roboRallyGame.setGameState(GameState.WAITING_FOR_OTHER_PLAYERS_PROGRAMS); roboRallyWrapper.roboRallyGame.setGameState(GameState.WAITING_FOR_OTHER_PLAYERS_PROGRAMS);
roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLoadingScreen(this.roboRallyWrapper)); roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLoadingScreen(this.roboRallyWrapper));

View File

@ -114,7 +114,7 @@ class RoboRallyClientListener extends Listener {
if (wrapper.getGame().getRobotPowerDown()) { if (wrapper.getGame().getRobotPowerDown()) {
wrapper.getGame().setGameState(GameState.SKIP_POWER_DOWN_SCREEN); wrapper.getGame().setGameState(GameState.SKIP_POWER_DOWN_SCREEN);
} else { } else {
wrapper.getGame().setGameState(GameState.CHOOSING_POWER_DOWN); wrapper.getGame().setGameState(GameState.CHOOSING_CARDS);
} }
} else { } else {
wrapper.getGame().setGameState(GameState.CHOOSING_CARDS); wrapper.getGame().setGameState(GameState.CHOOSING_CARDS);