Fixed: FullScreen Login after Standing displays
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user