From f7f66ec5db9e9fd253e9b6f9c02ed1ed2c42eafd Mon Sep 17 00:00:00 2001 From: Jona Walpert Date: Tue, 14 Apr 2026 23:15:39 +0200 Subject: [PATCH] Feat: uses real lobby id and not hardcoded id --- .../dbis/cs108/casono/client/ui/gameui/CasinoGameUI.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/CasinoGameUI.java b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/CasinoGameUI.java index f5fe36c..2970e70 100644 --- a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/CasinoGameUI.java +++ b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/CasinoGameUI.java @@ -114,8 +114,11 @@ public class CasinoGameUI extends Application { Parent root = fxmlLoader.load(); CasinoGameController controller = fxmlLoader.getController(); - int gameId = 1; // TODO echte gameId einsetzen - GameClient gameClient = new GameClient(clientService, gameId); + if (lobbyId <= 0) { + throw new IllegalStateException("CasinoGameUI: lobbyId must be set before start()"); + } + + GameClient gameClient = new GameClient(clientService, lobbyId); GameService gameService = new GameService(gameClient); controller.setGameService(gameService);