fix: fixed bug where winner was not declared in WinEvent
This commit is contained in:
parent
3c49c5bbd8
commit
0248eaf154
@ -292,9 +292,9 @@ public class Lobby {
|
|||||||
connection.broadcastEvents(
|
connection.broadcastEvents(
|
||||||
new EventBuilder(EventType.WinEvent)
|
new EventBuilder(EventType.WinEvent)
|
||||||
.withPlayerWon(winner.type.equals(ParticipantType.PlayerOne) ? 1 : 2)
|
.withPlayerWon(winner.type.equals(ParticipantType.PlayerOne) ? 1 : 2)
|
||||||
.buildGameStateEvent(),
|
.buildGameEvent(),
|
||||||
new EventBuilder(EventType.DisconnectEvent)
|
new EventBuilder(EventType.DisconnectEvent)
|
||||||
.buildGameStateEvent());
|
.buildGameEvent());
|
||||||
connection.terminate();
|
connection.terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user