From 0336e4432cd6d3199410988d6fc742fff9296b4c Mon Sep 17 00:00:00 2001 From: rubenpirreram Date: Wed, 20 May 2026 17:30:37 +0200 Subject: [PATCH] Fixed_last: now if the server crash when there is only one player, at the restart the server will forgive the old game. (Probably also the remaining player is disconnected) --- src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java b/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java index 7d7d564..aa62a70 100644 --- a/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java +++ b/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java @@ -87,7 +87,7 @@ public class ServerLauncher { this.serverRMI = serverRMI; this.gameController = gameController; Game game= loadSave(); - if(game!=null && game.disconnetedPlayers.entrySet().stream().filter(Map.Entry::getValue).count() >game.getNPlayers()-1){ + if(game!=null && game.disconnetedPlayers.entrySet().stream().filter(Map.Entry::getValue).count() >=game.getNPlayers()-1){ gameController.setModel(null); this.deleteSave(); }