Add: Supply gameUI with client service at game startup

This commit is contained in:
Jona Walpert
2026-04-08 13:33:31 +02:00
parent d855f2d568
commit 5d4d2655ef
@@ -317,8 +317,10 @@ public class LobbyButtonGridManager {
}); });
// Start the Game UI using the prepared stage // Start the Game UI using the prepared stage
try { try {
new ch.unibas.dmi.dbis.cs108.casono.client.ui.gameui.CasinoGameUI() // ClientService an GameUI übergeben
.start(gameStage); ch.unibas.dmi.dbis.cs108.casono.client.ui.gameui.CasinoGameUI
.setClientService(lobbyClient.getClientService());
new ch.unibas.dmi.dbis.cs108.casono.client.ui.gameui.CasinoGameUI().start(gameStage);
} catch (Exception e) { } catch (Exception e) {
LOGGER.error("Error starting Game UI: {}", e.getMessage()); LOGGER.error("Error starting Game UI: {}", e.getMessage());
// If starting fails, show the lobby again // If starting fails, show the lobby again