mirror of
				https://github.com/inf112-v20/Fiasko.git
				synced 2025-11-04 11:43:44 +01:00 
			
		
		
		
	Prøver å fikse en bug der brukeren entrer power down screen når den ikke skal
This commit is contained in:
		@@ -25,10 +25,6 @@ public enum GameState {
 | 
			
		||||
     * Indicates that the user is in the process of 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
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -63,9 +63,6 @@ public class LoadingScreen extends AbstractScreen {
 | 
			
		||||
            case EXITED:
 | 
			
		||||
                roboRallyWrapper.quit("All players died. Cannot continue playing.");
 | 
			
		||||
                break;
 | 
			
		||||
            case CHOOSING_POWER_DOWN:
 | 
			
		||||
                roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getPowerDownScreen(this.roboRallyWrapper));
 | 
			
		||||
                break;
 | 
			
		||||
            case SKIP_POWER_DOWN_SCREEN:
 | 
			
		||||
                roboRallyWrapper.roboRallyGame.setGameState(GameState.WAITING_FOR_OTHER_PLAYERS_PROGRAMS);
 | 
			
		||||
                roboRallyWrapper.setScreen(roboRallyWrapper.screenManager.getLoadingScreen(this.roboRallyWrapper));
 | 
			
		||||
 
 | 
			
		||||
@@ -114,7 +114,7 @@ class RoboRallyClientListener extends Listener {
 | 
			
		||||
                if (wrapper.getGame().getRobotPowerDown()) {
 | 
			
		||||
                    wrapper.getGame().setGameState(GameState.SKIP_POWER_DOWN_SCREEN);
 | 
			
		||||
                } else {
 | 
			
		||||
                    wrapper.getGame().setGameState(GameState.CHOOSING_POWER_DOWN);
 | 
			
		||||
                    wrapper.getGame().setGameState(GameState.CHOOSING_CARDS);
 | 
			
		||||
                }
 | 
			
		||||
            } else {
 | 
			
		||||
                wrapper.getGame().setGameState(GameState.CHOOSING_CARDS);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user