Server notify end game

This commit is contained in:
rubenpirreram
2026-05-15 20:04:29 +02:00
parent 748d3d6d7e
commit 89de79b5c8
@@ -165,7 +165,8 @@ public class ServerLauncher {
}
disconnectionTimer = timerExecutor.schedule(() -> {
game.EndGameForFeit(game.getPlayerByUsername(playerList.keySet().stream().toList().getFirst()));
actionQueue.offer(new EndedGame(game.getSlotMap(), game.orderLogicCard, game.getCurrentState(),game.getPlayerStanding()));
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.");
}, 1, TimeUnit.MINUTES);
}