diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/Lobby.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/Lobby.java index 280e346..2bb1876 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/Lobby.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/Lobby.java @@ -147,10 +147,10 @@ public class Lobby { new EventBuilder(EventType.TimeoutEvent).buildGameStateEvent()); connection.removeParticipant(source); - if(connection.hasPlayer1()){ + if(connection.hasPlayer1() && !connection.hasPlayer2()){ generateWin(connection.getPlayer1()); } - else if(connection.hasPlayer2()) { + else if(!connection.hasPlayer1() && connection.hasPlayer2()) { generateWin(connection.getPlayer2()); } else {