Feat: uses real lobby id and not hardcoded id

This commit is contained in:
Jona Walpert
2026-04-14 23:15:39 +02:00
parent d85b3d21ee
commit f7f66ec5db
@@ -114,8 +114,11 @@ public class CasinoGameUI extends Application {
Parent root = fxmlLoader.load(); Parent root = fxmlLoader.load();
CasinoGameController controller = fxmlLoader.getController(); CasinoGameController controller = fxmlLoader.getController();
int gameId = 1; // TODO echte gameId einsetzen if (lobbyId <= 0) {
GameClient gameClient = new GameClient(clientService, gameId); throw new IllegalStateException("CasinoGameUI: lobbyId must be set before start()");
}
GameClient gameClient = new GameClient(clientService, lobbyId);
GameService gameService = new GameService(gameClient); GameService gameService = new GameService(gameClient);
controller.setGameService(gameService); controller.setGameService(gameService);