Fixed: Standing Order When Forfeit (MiniModel & Network)

This commit is contained in:
rubenpirreram
2026-05-16 10:31:21 +02:00
parent 93320b69bf
commit a9bc9c08f8
4 changed files with 12 additions and 7 deletions
@@ -164,10 +164,13 @@ public class ServerLauncher {
disconnectionTimer.cancel(false);
}
disconnectionTimer = timerExecutor.schedule(() -> {
game.EndGameForFeit(game.getPlayerByUsername(playerList.keySet().stream().toList().getFirst()));
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.");
if(!this.deleteSave()){
System.out.println("\n!!! Couldn't delete save !!!\n");
}
}, 1, TimeUnit.MINUTES);
}
return !event.getIsError();