listAllLobbies() method started

This commit is contained in:
Sebastian Lenzlinger 2022-04-08 16:59:48 +02:00
parent 372a02a093
commit f910775f96

View File

@ -224,7 +224,17 @@ public class ClientHandler implements Runnable {
LOGGER.debug(
this.getClientUserName() + " created a new lobby with ID: " + newGame.getLobbyID());
//TODO add server response. Here a possibility:
sendMsgToClient("New lobby with ID: " + newGame + " created.");
sendMsgToClient(Protocol.printToClientConsole + "$New lobby with ID: " + newGame + " created.");
}
public void listAllLobbies() {
if(serverData.getAllLobbies().isEmpty()) {
sendMsgToClient(Protocol.printToClientConsole +"$There are currently no open lobbies");
LOGGER.debug("No open lobbies");
} else {
StringBuilder response = new StringBuilder();
}
}
/**