Fixed: FullScreen Login after Standing displays

This commit is contained in:
rubenpirreram
2026-05-27 18:33:59 +02:00
parent a124feb639
commit d14126f198
3 changed files with 19 additions and 17 deletions
@@ -123,9 +123,8 @@ public class ServerLauncher {
disconnectionTimer.cancel(false);
disconnectionTimer = null;
}
int roundPrev=gameController.getModel().getCurrentState().getRound();
synchronized(gameController){
int roundPrev=gameController.getModel().getCurrentState().getRound();
//applies the event and set if is an error
event.setIsError(!event.apply(gameController));
Game game=gameController.getModel();
@@ -153,18 +152,21 @@ public class ServerLauncher {
}
//schedule endgame for forfeit
disconnectionTimer = timerExecutor.schedule(() -> {
game.EndGameForFeit();
serverRMI.notifyAll(new EndedGame(game.getSlotMap(), game.orderLogicCard, game.getCurrentState(),game.getPlayerStanding()));
serverTCP.notifyAll(new EndedGame(game.getSlotMap(), game.orderLogicCard, game.getCurrentState(),game.getPlayerStanding()));
System.out.println("Timer expired: no player reconnected in 60s.");
for(Map.Entry<String,Boolean> entry:playerList.entrySet()){
if(!entry.getValue())
playerList.remove(entry.getKey());
synchronized (gameController)
{
game.EndGameForFeit();
serverRMI.notifyAll(new EndedGame(game.getSlotMap(), game.orderLogicCard, game.getCurrentState(),game.getPlayerStanding()));
serverTCP.notifyAll(new EndedGame(game.getSlotMap(), game.orderLogicCard, game.getCurrentState(),game.getPlayerStanding()));
System.out.println("Timer expired: no player reconnected in 60s.");
for(Map.Entry<String,Boolean> entry:playerList.entrySet()){
if(!entry.getValue())
playerList.remove(entry.getKey());
}
if(!this.deleteSave()){
System.out.println("\n!!! Couldn't delete save !!!\n");
}
disconnectionTimer = null;
}
if(!this.deleteSave()){
System.out.println("\n!!! Couldn't delete save !!!\n");
}
disconnectionTimer = null;
}, 1, TimeUnit.MINUTES);
}
//if the round is changed send a new next round event , the previous event is ignored and directly sent the next round(also upper and lower lists updated)
@@ -65,6 +65,7 @@ public class GUI extends Application implements IView {
controllerLeaderboard.setController(controller,()->{
primaryStage.setScene(loginScene);
controllerLogin.showError("");
primaryStage.setFullScreen(true);
},loginScene);
@@ -143,10 +144,12 @@ public class GUI extends Application implements IView {
if(error==ErrorType.SERVER_CRASHED){
primaryStage.setScene(loginScene);
controllerLogin.showError(error);
primaryStage.setFullScreen(true);
}else {
synchronized (miniModel) {
controllerMain.isError = true;
controllerMain.render();
}
}
});
@@ -112,8 +112,7 @@ public class MainFXMLController {
renderMyHand();
}
renderSidePanel();
isError=false;
}
@@ -323,8 +322,6 @@ public class MainFXMLController {
tt.setCycleCount(6);
tt.setAutoReverse(true);
tt.play();
isError=false;
}
}
headerRow.getChildren().addAll(totem, usernameLabel);