From cbdb2017b8a16c27608a214e9e0eb444a6348908 Mon Sep 17 00:00:00 2001 From: Yannik Bretschneider Date: Sun, 6 Jun 2021 12:47:09 +0200 Subject: [PATCH] refactor: removed callback in constructor --- .../marvelous/server/lobbymanager/LobbyManager.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyManager.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyManager.java index fa39d8c..4a50a01 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyManager.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyManager.java @@ -17,11 +17,9 @@ import java.util.function.BiConsumer; public class LobbyManager { private final HashMap lobbies; private final HashMap resourceDescriptorToLobby; - private final BiConsumer sendMessageCallback; private String localResourceDescriptor; - public LobbyManager(BiConsumer 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); } /**