refactor: removed callback in constructor
This commit is contained in:
parent
07d440bfac
commit
cbdb2017b8
@ -17,11 +17,9 @@ import java.util.function.BiConsumer;
|
||||
public class LobbyManager {
|
||||
private final HashMap<Participant, LobbyConnection> lobbies;
|
||||
private final HashMap<String, LobbyConnection> resourceDescriptorToLobby;
|
||||
private final BiConsumer<Participant, BasicMessage> sendMessageCallback;
|
||||
private String localResourceDescriptor;
|
||||
|
||||
public LobbyManager(BiConsumer<Participant, BasicMessage> sendMessageCallback) {
|
||||
this.sendMessageCallback = sendMessageCallback;
|
||||
public LobbyManager() {
|
||||
this.lobbies = new HashMap<>();
|
||||
this.resourceDescriptorToLobby = new HashMap<>();
|
||||
}
|
||||
@ -92,7 +90,7 @@ public class LobbyManager {
|
||||
}
|
||||
|
||||
private LobbyConnection initializeNewLobby(String gameID) {
|
||||
return new LobbyConnection(gameID, sendMessageCallback);
|
||||
return new LobbyConnection(gameID);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user