diff --git a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/LobbyClient.java b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/LobbyClient.java index 996f767..f74853d 100644 --- a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/LobbyClient.java +++ b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/LobbyClient.java @@ -19,6 +19,10 @@ public class LobbyClient { this.client = client; } + public ClientService getClientService() { + return client; + } + /** * Fetch the current status of the lobby with the given id from the server. * @@ -61,4 +65,13 @@ public class LobbyClient { public void joinLobby(int lobbyId) { client.processCommand("JOIN_LOBBY ID=" + lobbyId); } + + /** + * Logs in to the server with the given username by sending a "LOGIN" command. + * + * @param user The username to log in with. + */ + public void login(String user) { + client.processCommand("LOGIN USERNAME=" + user); + } }