fix: fixed bug where winner was not declared in WinEvent
This commit is contained in:
		@ -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();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user