From 0248eaf15424b654a7ea24e29b20aa6eed54bfaa Mon Sep 17 00:00:00 2001 From: Yannik Bretschneider Date: Mon, 7 Jun 2021 17:47:04 +0200 Subject: [PATCH] fix: fixed bug where winner was not declared in WinEvent --- .../main/java/uulm/teamname/marvelous/server/lobby/Lobby.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 1440d34..6d45cec 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 @@ -292,9 +292,9 @@ public class Lobby { connection.broadcastEvents( new EventBuilder(EventType.WinEvent) .withPlayerWon(winner.type.equals(ParticipantType.PlayerOne) ? 1 : 2) - .buildGameStateEvent(), + .buildGameEvent(), new EventBuilder(EventType.DisconnectEvent) - .buildGameStateEvent()); + .buildGameEvent()); connection.terminate(); }