added the client logic to receive the LobbyAccept and LobbyDeny message

This commit is contained in:
Fleischer Hanno
2024-12-02 21:52:07 +01:00
parent e94ed1e019
commit 5910fcc701
9 changed files with 128 additions and 72 deletions

View File

@@ -112,11 +112,8 @@ private void tryHost() {
} catch (InterruptedException ignored) {
}
hostDialog.connectServerAsClient();
try {
Thread.sleep(1000);
} catch (InterruptedException ignored) {
}
app.getModelSynchronize().setHost(port);
app.getGameLogic().selectHost("");
//app.getAcousticHandler().playSound(MdgaSound.WRONG_INPUT);
return;
}
@@ -144,11 +141,7 @@ private void tryJoin() {
app.getModelSynchronize().setName(startDialog.getName());
joinDialog.setHostname(ip);
joinDialog.connectToServer();
try {
Thread.sleep(1000);
} catch (InterruptedException ignored) {
}
app.getModelSynchronize().setJoin(ip, port);
app.getGameLogic().selectJoin("");
return;
}
} catch (IllegalArgumentException e) {