From 1dcf628d2c26f63ce888fb0f6ed7dbdabef3648d Mon Sep 17 00:00:00 2001 From: Jona Walpert Date: Sun, 12 Apr 2026 13:08:57 +0200 Subject: [PATCH 1/5] Feat: Log player joins in LobbyManager --- .../cs108/casono/server/domain/lobby/LobbyManager.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/domain/lobby/LobbyManager.java b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/domain/lobby/LobbyManager.java index 2179e8a..515aee4 100644 --- a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/domain/lobby/LobbyManager.java +++ b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/domain/lobby/LobbyManager.java @@ -69,6 +69,15 @@ public class LobbyManager { lobby.addPlayerAndMaybeStart( username, maxPlayersPerLobby, AUTO_START_PLAYERS, DEFAULT_START_CHIPS); if (result != AddResult.NOT_ADDED) { + LOGGER.info( + () -> + "User '" + + username + + "' joined lobby " + + lobbyId.value() + + " (result=" + + result + + ")"); playerToLobby.put(username, lobbyId); if (result == AddResult.ADDED_AND_STARTED) { LOGGER.info( -- 2.52.0 From e43732c52053002872d251abb2aa68005b9d519b Mon Sep 17 00:00:00 2001 From: Jona Walpert Date: Sun, 12 Apr 2026 13:12:55 +0200 Subject: [PATCH 2/5] Feat: Log JOIN_LOBBY requests and joins --- .../lobby/join_lobby/JoinLobbyHandler.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/app/commands/lobby/join_lobby/JoinLobbyHandler.java b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/app/commands/lobby/join_lobby/JoinLobbyHandler.java index 579c281..169b027 100644 --- a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/app/commands/lobby/join_lobby/JoinLobbyHandler.java +++ b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/app/commands/lobby/join_lobby/JoinLobbyHandler.java @@ -9,6 +9,8 @@ import ch.unibas.dmi.dbis.cs108.casono.server.network.command.execution.CommandH import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.response.ErrorResponse; import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.response.OkResponse; import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.response.dispatcher.ResponseDispatcher; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; /** * Handler for the `JOIN_LOBBY` command. @@ -21,6 +23,7 @@ import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.response.dispatch public class JoinLobbyHandler extends CommandHandler { private final LobbyManager lobbyManager; private final UserRegistry userRegistry; + private static final Logger LOGGER = LogManager.getLogger(JoinLobbyHandler.class); /** * Create a new {@link JoinLobbyHandler}. @@ -46,9 +49,17 @@ public class JoinLobbyHandler extends CommandHandler { */ @Override public void execute(JoinLobbyRequest request) { + LOGGER.info( + "JOIN_LOBBY request: session={}, lobbyId={}", + request.getContext().sessionId(), + request.getId()); LobbyId lid = LobbyId.of(request.getId()); var lobby = lobbyManager.getLobby(lid); if (lobby == null) { + LOGGER.warn( + "JOIN_LOBBY: Lobby {} not found (session={})", + request.getId(), + request.getContext().sessionId()); responseDispatcher.dispatch( new ErrorResponse(request.getContext(), "LOBBY_NOT_FOUND", "Lobby not found")); return; @@ -56,7 +67,9 @@ public class JoinLobbyHandler extends CommandHandler { var maybeUser = userRegistry.getBySessionId(request.getContext().sessionId()); if (maybeUser.isEmpty()) { - // UserLoggedInCheck should normally prevent this; keep safe fallback + LOGGER.warn( + "JOIN_LOBBY: No user associated with session {}", + request.getContext().sessionId()); responseDispatcher.dispatch( new ErrorResponse( request.getContext(), @@ -70,6 +83,10 @@ public class JoinLobbyHandler extends CommandHandler { boolean ok = lobbyManager.addPlayerToLobby(username, lid); if (!ok) { + LOGGER.warn( + "JOIN_LOBBY: User '{}' failed to join lobby {} (full or already in)", + username, + request.getId()); responseDispatcher.dispatch( new ErrorResponse( request.getContext(), @@ -78,6 +95,8 @@ public class JoinLobbyHandler extends CommandHandler { return; } + LOGGER.info("User '{}' joined lobby {}", username, request.getId()); + responseDispatcher.dispatch(new OkResponse(request.getContext())); } } -- 2.52.0 From 3abc03e6e1c36f9e994b9cf206a87afc4cecff75 Mon Sep 17 00:00:00 2001 From: Jona Walpert Date: Sun, 12 Apr 2026 13:25:59 +0200 Subject: [PATCH 3/5] Fix: fix error when switching back to mainLobby when exiting gameUI --- .../gameuicomponents/TaskbarController.java | 124 ++++++++++++------ 1 file changed, 84 insertions(+), 40 deletions(-) diff --git a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/TaskbarController.java b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/TaskbarController.java index 667a584..431889f 100644 --- a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/TaskbarController.java +++ b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/TaskbarController.java @@ -5,7 +5,7 @@ import ch.unibas.dmi.dbis.cs108.casono.client.game.GameState; import ch.unibas.dmi.dbis.cs108.casono.client.game.Player; import ch.unibas.dmi.dbis.cs108.casono.client.game.PlayerId; import ch.unibas.dmi.dbis.cs108.casono.client.game.PlayerState; -import ch.unibas.dmi.dbis.cs108.casono.client.ui.lobbyui.Casinomainui; +// Casinomainui is loaded via FXMLLoader when switching back to the lobby UI import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.Label; @@ -20,20 +20,29 @@ import org.apache.logging.log4j.Logger; /** * Controller for the interactive taskbar within the poker UI. * - *

Responsible for: - Drag-and-drop movement of the taskbar, - Input and management of game + *

+ * Responsible for: - Drag-and-drop movement of the taskbar, - Input and + * management of game * stakes, - Control of general menu functions such as Exit. */ public class TaskbarController { private static final Logger LOGGER = LogManager.getLogger(CasinoBrowserController.class); - @FXML private HBox taskbar; - @FXML private TextField taskbarInput; - @FXML private Button betButton; - @FXML private Button callButton; - @FXML private Button foldButton; - @FXML private Button raiseButton; - @FXML private Label moneyLabel; + @FXML + private HBox taskbar; + @FXML + private TextField taskbarInput; + @FXML + private Button betButton; + @FXML + private Button callButton; + @FXML + private Button foldButton; + @FXML + private Button raiseButton; + @FXML + private Label moneyLabel; private GameService gameService; private PlayerId myPlayerId; @@ -57,10 +66,12 @@ public class TaskbarController { } /** - * Updates the state of the basic action buttons (Bet, Call, Fold, Raise) and the input field + * Updates the state of the basic action buttons (Bet, Call, Fold, Raise) and + * the input field * * @param isMyTurn Indicates whether it is currently the player's turn. - * @param isOut Indicates whether the player is currently out of the game (folded or all-in). + * @param isOut Indicates whether the player is currently out of the game + * (folded or all-in). */ private void updateBasicButtons(boolean isMyTurn, boolean isOut) { @@ -89,7 +100,8 @@ public class TaskbarController { } /** - * Sets the given button to a disabled state with red styling, indicating that the player is out + * Sets the given button to a disabled state with red styling, indicating that + * the player is out * * @param b The button to be styled as red and disabled */ @@ -105,7 +117,8 @@ public class TaskbarController { } /** - * Sets the given input field to a disabled state with red styling, indicating that the player + * Sets the given input field to a disabled state with red styling, indicating + * that the player * is out * * @param t The text field to be styled as red and disabled @@ -122,7 +135,8 @@ public class TaskbarController { } /** - * Activates the given button by enabling it and applying yellow styling, indicating that it is + * Activates the given button by enabling it and applying yellow styling, + * indicating that it is * the player's turn * * @param b The button to be activated and styled for the player's turn @@ -138,7 +152,8 @@ public class TaskbarController { } /** - * Activates the given input field by enabling it and applying yellow styling, indicating that + * Activates the given input field by enabling it and applying yellow styling, + * indicating that * it is the player's turn * * @param t The text field to be activated and styled for the player's turn @@ -154,7 +169,8 @@ public class TaskbarController { } /** - * Deactivates the given button by disabling it and applying gray styling, indicating that it is + * Deactivates the given button by disabling it and applying gray styling, + * indicating that it is * not the player's turn * * @param b The button to be deactivated and styled for non-active state @@ -171,7 +187,8 @@ public class TaskbarController { } /** - * Deactivates the given input field by disabling it and applying gray styling, indicating that + * Deactivates the given input field by disabling it and applying gray styling, + * indicating that * it is not the player's turn * * @param t The text field to be deactivated and styled for non-active state @@ -188,7 +205,8 @@ public class TaskbarController { } /** - * Updates the displayed amount of money the player has. The amount is shown in the format "X$". + * Updates the displayed amount of money the player has. The amount is shown in + * the format "X$". * * @param amount The amount of money to display for the player. */ @@ -202,7 +220,8 @@ public class TaskbarController { } /** - * Initializes the taskbar controller. This method is called automatically after the FXML + * Initializes the taskbar controller. This method is called automatically after + * the FXML * components have been loaded. */ @FXML @@ -211,8 +230,10 @@ public class TaskbarController { } /** - * Updates the taskbar based on the current game state and the player's status. It checks if - * it's the player's turn and whether they are out of the game (folded or all-in) to adjust the + * Updates the taskbar based on the current game state and the player's status. + * It checks if + * it's the player's turn and whether they are out of the game (folded or + * all-in) to adjust the * button states and displayed money accordingly. * * @param state @@ -225,11 +246,10 @@ public class TaskbarController { return; } - Player me = - state.players.stream() - .filter(p -> myPlayerId.equals(p.getId())) - .findFirst() - .orElse(null); + Player me = state.players.stream() + .filter(p -> myPlayerId.equals(p.getId())) + .findFirst() + .orElse(null); if (me == null) { LOGGER.error("Player not found in GameState!"); @@ -246,7 +266,8 @@ public class TaskbarController { } /** - * Called when the taskbar is clicked with the mouse. Saves the relative position for later, + * Called when the taskbar is clicked with the mouse. Saves the relative + * position for later, * correct repositioning. * * @param event The mouse event @@ -258,10 +279,13 @@ public class TaskbarController { } /** - * Called while dragging the taskbar with the mouse. Updates the position and slightly scales + * Called while dragging the taskbar with the mouse. Updates the position and + * slightly scales * the taskbar for visual feedback. * - *

TODO: It still needs to be fixed that the taskbar cannot disappear out of the window. + *

+ * TODO: It still needs to be fixed that the taskbar cannot disappear out of the + * window. * * @param event Das Mausereignis */ @@ -275,7 +299,8 @@ public class TaskbarController { } /** - * Called when the mouse cursor is released over the taskbar. Resets the taskbar scaling to + * Called when the mouse cursor is released over the taskbar. Resets the taskbar + * scaling to * normal size. * * @param event The mouse event @@ -299,7 +324,8 @@ public class TaskbarController { } /** - * Called when the submit button in the taskbar is pressed. Triggers the processing of the + * Called when the submit button in the taskbar is pressed. Triggers the + * processing of the * deployment. */ @FXML @@ -360,7 +386,8 @@ public class TaskbarController { } /** - * Refreshes the game state by fetching the latest state from the GameService and updating the + * Refreshes the game state by fetching the latest state from the GameService + * and updating the * taskbar accordingly. */ private void refreshGame() { @@ -375,28 +402,43 @@ public class TaskbarController { } /** - * Called when the Exit button is clicked. Closes the current game stage and opens the lobby UI. + * Called when the Exit button is clicked. Closes the current game stage and + * opens the lobby UI. */ @FXML private void onExitButtonClick() { javafx.application.Platform.runLater( () -> { // Close game stage - javafx.stage.Stage currentStage = - (javafx.stage.Stage) taskbar.getScene().getWindow(); + javafx.stage.Stage currentStage = (javafx.stage.Stage) taskbar.getScene().getWindow(); currentStage.close(); // Start lobby UI try { - new Casinomainui().start(new javafx.stage.Stage()); + javafx.stage.Stage newStage = new javafx.stage.Stage(); + javafx.fxml.FXMLLoader fxmlLoader = new javafx.fxml.FXMLLoader( + getClass().getResource("/ui-structure/Casinomainui.fxml")); + javafx.scene.Parent root = fxmlLoader.load(); + javafx.scene.Scene scene = new javafx.scene.Scene(root, 1200, 800); + newStage.setTitle("Casono"); + javafx.scene.image.Image icon = new javafx.scene.image.Image( + getClass() + .getResource("/images/logoinverted.png") + .toExternalForm()); + newStage.getIcons().add(icon); + newStage.setScene(scene); + newStage.setFullScreen(true); + newStage.show(); } catch (Exception e) { - LOGGER.error("Error: starting the lobby UI: {}", e.getMessage()); + LOGGER.error("Error: starting the lobby UI: {}", e.getMessage(), e); } }); } /** - * Processes the stake entered in the text field. Only integer values between 5 and 100,000 - * credits are accepted, in multiples of 5 (in increments of 5). The stake is currently only + * Processes the stake entered in the text field. Only integer values between 5 + * and 100,000 + * credits are accepted, in multiples of 5 (in increments of 5). The stake is + * currently only * displayed on the console. */ private void processBet() { @@ -434,7 +476,9 @@ public class TaskbarController { /** * Opens the integrated Casono web browser. * - *

TODO: Replace the start URL with the official project website (e.g., Tips & Tricks page) + *

+ * TODO: Replace the start URL with the official project website (e.g., Tips & + * Tricks page) * once the content for strategies and support is available. */ @FXML -- 2.52.0 From 4fa60ad9e045d9eca794128e415bc31153c9029a Mon Sep 17 00:00:00 2001 From: Jona Walpert Date: Sun, 12 Apr 2026 13:30:11 +0200 Subject: [PATCH 4/5] Fix: Apply checkstyle fixes --- .../gameuicomponents/TaskbarController.java | 125 +++++++----------- .../client/ui/lobbyui/Casinomainui.java | 4 +- 2 files changed, 51 insertions(+), 78 deletions(-) diff --git a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/TaskbarController.java b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/TaskbarController.java index 431889f..096ac28 100644 --- a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/TaskbarController.java +++ b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/TaskbarController.java @@ -5,7 +5,7 @@ import ch.unibas.dmi.dbis.cs108.casono.client.game.GameState; import ch.unibas.dmi.dbis.cs108.casono.client.game.Player; import ch.unibas.dmi.dbis.cs108.casono.client.game.PlayerId; import ch.unibas.dmi.dbis.cs108.casono.client.game.PlayerState; -// Casinomainui is loaded via FXMLLoader when switching back to the lobby UI +import ch.unibas.dmi.dbis.cs108.casono.client.ui.lobbyui.Casinomainui; import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.Label; @@ -20,29 +20,20 @@ import org.apache.logging.log4j.Logger; /** * Controller for the interactive taskbar within the poker UI. * - *

- * Responsible for: - Drag-and-drop movement of the taskbar, - Input and - * management of game + *

Responsible for: - Drag-and-drop movement of the taskbar, - Input and management of game * stakes, - Control of general menu functions such as Exit. */ public class TaskbarController { private static final Logger LOGGER = LogManager.getLogger(CasinoBrowserController.class); - @FXML - private HBox taskbar; - @FXML - private TextField taskbarInput; - @FXML - private Button betButton; - @FXML - private Button callButton; - @FXML - private Button foldButton; - @FXML - private Button raiseButton; - @FXML - private Label moneyLabel; + @FXML private HBox taskbar; + @FXML private TextField taskbarInput; + @FXML private Button betButton; + @FXML private Button callButton; + @FXML private Button foldButton; + @FXML private Button raiseButton; + @FXML private Label moneyLabel; private GameService gameService; private PlayerId myPlayerId; @@ -66,12 +57,10 @@ public class TaskbarController { } /** - * Updates the state of the basic action buttons (Bet, Call, Fold, Raise) and - * the input field + * Updates the state of the basic action buttons (Bet, Call, Fold, Raise) and the input field * * @param isMyTurn Indicates whether it is currently the player's turn. - * @param isOut Indicates whether the player is currently out of the game - * (folded or all-in). + * @param isOut Indicates whether the player is currently out of the game (folded or all-in). */ private void updateBasicButtons(boolean isMyTurn, boolean isOut) { @@ -100,8 +89,7 @@ public class TaskbarController { } /** - * Sets the given button to a disabled state with red styling, indicating that - * the player is out + * Sets the given button to a disabled state with red styling, indicating that the player is out * * @param b The button to be styled as red and disabled */ @@ -117,8 +105,7 @@ public class TaskbarController { } /** - * Sets the given input field to a disabled state with red styling, indicating - * that the player + * Sets the given input field to a disabled state with red styling, indicating that the player * is out * * @param t The text field to be styled as red and disabled @@ -135,8 +122,7 @@ public class TaskbarController { } /** - * Activates the given button by enabling it and applying yellow styling, - * indicating that it is + * Activates the given button by enabling it and applying yellow styling, indicating that it is * the player's turn * * @param b The button to be activated and styled for the player's turn @@ -152,8 +138,7 @@ public class TaskbarController { } /** - * Activates the given input field by enabling it and applying yellow styling, - * indicating that + * Activates the given input field by enabling it and applying yellow styling, indicating that * it is the player's turn * * @param t The text field to be activated and styled for the player's turn @@ -169,8 +154,7 @@ public class TaskbarController { } /** - * Deactivates the given button by disabling it and applying gray styling, - * indicating that it is + * Deactivates the given button by disabling it and applying gray styling, indicating that it is * not the player's turn * * @param b The button to be deactivated and styled for non-active state @@ -187,8 +171,7 @@ public class TaskbarController { } /** - * Deactivates the given input field by disabling it and applying gray styling, - * indicating that + * Deactivates the given input field by disabling it and applying gray styling, indicating that * it is not the player's turn * * @param t The text field to be deactivated and styled for non-active state @@ -205,8 +188,7 @@ public class TaskbarController { } /** - * Updates the displayed amount of money the player has. The amount is shown in - * the format "X$". + * Updates the displayed amount of money the player has. The amount is shown in the format "X$". * * @param amount The amount of money to display for the player. */ @@ -220,8 +202,7 @@ public class TaskbarController { } /** - * Initializes the taskbar controller. This method is called automatically after - * the FXML + * Initializes the taskbar controller. This method is called automatically after the FXML * components have been loaded. */ @FXML @@ -230,10 +211,8 @@ public class TaskbarController { } /** - * Updates the taskbar based on the current game state and the player's status. - * It checks if - * it's the player's turn and whether they are out of the game (folded or - * all-in) to adjust the + * Updates the taskbar based on the current game state and the player's status. It checks if + * it's the player's turn and whether they are out of the game (folded or all-in) to adjust the * button states and displayed money accordingly. * * @param state @@ -246,10 +225,11 @@ public class TaskbarController { return; } - Player me = state.players.stream() - .filter(p -> myPlayerId.equals(p.getId())) - .findFirst() - .orElse(null); + Player me = + state.players.stream() + .filter(p -> myPlayerId.equals(p.getId())) + .findFirst() + .orElse(null); if (me == null) { LOGGER.error("Player not found in GameState!"); @@ -266,8 +246,7 @@ public class TaskbarController { } /** - * Called when the taskbar is clicked with the mouse. Saves the relative - * position for later, + * Called when the taskbar is clicked with the mouse. Saves the relative position for later, * correct repositioning. * * @param event The mouse event @@ -279,13 +258,10 @@ public class TaskbarController { } /** - * Called while dragging the taskbar with the mouse. Updates the position and - * slightly scales + * Called while dragging the taskbar with the mouse. Updates the position and slightly scales * the taskbar for visual feedback. * - *

- * TODO: It still needs to be fixed that the taskbar cannot disappear out of the - * window. + *

TODO: It still needs to be fixed that the taskbar cannot disappear out of the window. * * @param event Das Mausereignis */ @@ -299,8 +275,7 @@ public class TaskbarController { } /** - * Called when the mouse cursor is released over the taskbar. Resets the taskbar - * scaling to + * Called when the mouse cursor is released over the taskbar. Resets the taskbar scaling to * normal size. * * @param event The mouse event @@ -324,8 +299,7 @@ public class TaskbarController { } /** - * Called when the submit button in the taskbar is pressed. Triggers the - * processing of the + * Called when the submit button in the taskbar is pressed. Triggers the processing of the * deployment. */ @FXML @@ -386,8 +360,7 @@ public class TaskbarController { } /** - * Refreshes the game state by fetching the latest state from the GameService - * and updating the + * Refreshes the game state by fetching the latest state from the GameService and updating the * taskbar accordingly. */ private void refreshGame() { @@ -402,28 +375,32 @@ public class TaskbarController { } /** - * Called when the Exit button is clicked. Closes the current game stage and - * opens the lobby UI. + * Called when the Exit button is clicked. Closes the current game stage and opens the lobby UI. */ @FXML private void onExitButtonClick() { javafx.application.Platform.runLater( () -> { // Close game stage - javafx.stage.Stage currentStage = (javafx.stage.Stage) taskbar.getScene().getWindow(); + javafx.stage.Stage currentStage = + (javafx.stage.Stage) taskbar.getScene().getWindow(); currentStage.close(); // Start lobby UI try { javafx.stage.Stage newStage = new javafx.stage.Stage(); - javafx.fxml.FXMLLoader fxmlLoader = new javafx.fxml.FXMLLoader( - getClass().getResource("/ui-structure/Casinomainui.fxml")); + javafx.fxml.FXMLLoader fxmlLoader = + new javafx.fxml.FXMLLoader( + getClass().getResource("/ui-structure/Casinomainui.fxml")); javafx.scene.Parent root = fxmlLoader.load(); - javafx.scene.Scene scene = new javafx.scene.Scene(root, 1200, 800); + javafx.scene.Scene scene = + new javafx.scene.Scene( + root, Casinomainui.SCENE_WIDTH, Casinomainui.SCENE_HEIGHT); newStage.setTitle("Casono"); - javafx.scene.image.Image icon = new javafx.scene.image.Image( - getClass() - .getResource("/images/logoinverted.png") - .toExternalForm()); + javafx.scene.image.Image icon = + new javafx.scene.image.Image( + getClass() + .getResource("/images/logoinverted.png") + .toExternalForm()); newStage.getIcons().add(icon); newStage.setScene(scene); newStage.setFullScreen(true); @@ -435,10 +412,8 @@ public class TaskbarController { } /** - * Processes the stake entered in the text field. Only integer values between 5 - * and 100,000 - * credits are accepted, in multiples of 5 (in increments of 5). The stake is - * currently only + * Processes the stake entered in the text field. Only integer values between 5 and 100,000 + * credits are accepted, in multiples of 5 (in increments of 5). The stake is currently only * displayed on the console. */ private void processBet() { @@ -476,9 +451,7 @@ public class TaskbarController { /** * Opens the integrated Casono web browser. * - *

- * TODO: Replace the start URL with the official project website (e.g., Tips & - * Tricks page) + *

TODO: Replace the start URL with the official project website (e.g., Tips & Tricks page) * once the content for strategies and support is available. */ @FXML diff --git a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/lobbyui/Casinomainui.java b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/lobbyui/Casinomainui.java index bb7976c..67415c5 100644 --- a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/lobbyui/Casinomainui.java +++ b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/lobbyui/Casinomainui.java @@ -19,8 +19,8 @@ public class Casinomainui extends Application { // Default constructor } - private static final int SCENE_WIDTH = 1200; - private static final int SCENE_HEIGHT = 800; + public static final int SCENE_WIDTH = 1200; + public static final int SCENE_HEIGHT = 800; @Override /** -- 2.52.0 From 9044ce366084bee8cb50c0e05629cb403b9bc3d4 Mon Sep 17 00:00:00 2001 From: Jona Walpert Date: Sun, 12 Apr 2026 13:31:00 +0200 Subject: [PATCH 5/5] Fix: Allow primitive values to contain hyphens (UUIDs) in addition to digits/words/colons --- .../dmi/dbis/cs108/casono/client/network/ClientService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/ClientService.java b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/ClientService.java index e6b7643..8fac6f3 100644 --- a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/ClientService.java +++ b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/ClientService.java @@ -80,9 +80,11 @@ public class ClientService { return offlineMode; } + // Allow primitive values to contain hyphens (UUIDs) in addition to + // digits/words/colons static Pattern responseRex = Pattern.compile( - "(?\\w+)=(('(?([^']|\\')+)')|(?[+-]?[\\d\\w:]+))"); + "(?\\w+)=(('(?([^']|\\')+)')|(?[+-]?[-\\d\\w:]+))"); /** * Removes escape characters from a string, specifically converting escaped single quotes (\') -- 2.52.0