diff --git a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/CasinoGameController.java b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/CasinoGameController.java index ef0961f..3e71904 100644 --- a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/CasinoGameController.java +++ b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/CasinoGameController.java @@ -7,11 +7,11 @@ import javafx.scene.layout.VBox; /** * Controller for the casino gaming area. * - *

Responsible for: - the display of the poker table and the player interface, - the - * processing of user input, - the interface to the game engine and the network protocol. + *

Responsible for: - the display of the poker table and the player interface, - the processing + * of user input, - the interface to the game engine and the network protocol. * - *

Notes: - The `onTableClick()` method currently serves only as test logic. - * It may no longer be functional and will be replaced by the final game interaction in the future. + *

Notes: - The `onTableClick()` method currently serves only as test logic. It may no longer be + * functional and will be replaced by the final game interaction in the future. */ public class CasinoGameController { 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 0719583..2e91921 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 @@ -12,8 +12,8 @@ import javafx.stage.Stage; *

Starts the JavaFX application, loads the graphical user interface from the FXML file, and * initializes the main stage for the game. * - *

Tasks: - Loads the FXML interface "/ui-structure/Casinogameui.fxml". - Loads the - * application icon from "/images/logoinverted.png". - Starts the application in full-screen mode. + *

Tasks: - Loads the FXML interface "/ui-structure/Casinogameui.fxml". - Loads the application + * icon from "/images/logoinverted.png". - Starts the application in full-screen mode. */ public class CasinoGameUI extends Application { diff --git a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/CasinoBrowserController.java b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/CasinoBrowserController.java index 0da9775..72b0730 100644 --- a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/CasinoBrowserController.java +++ b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/CasinoBrowserController.java @@ -33,22 +33,21 @@ import org.apache.logging.log4j.Logger; /** * Experimental embedded browser for Casono. * - *

This class implements a simple embedded web browser based on {@link - * javafx.scene.web.WebView}. The browser primarily serves as a utility within the game to - * display external content such as web pages or videos. + *

This class implements a simple embedded web browser based on {@link javafx.scene.web.WebView}. + * The browser primarily serves as a utility within the game to display external content such as web + * pages or videos. * - *

Status The browser is currently in an experimental phase. Some - * security mechanisms are based on experimental AI-driven recommendations and may - * change in future versions. + *

Status The browser is currently in an experimental phase. Some security mechanisms are based + * on experimental AI-driven recommendations and may change in future versions. * - *

Purpose The browser is currently being used experimentally to: Explain poker rules directly within the game - * Display help pages or documentation Play videos (e.g., tutorials or explanations) + *

Purpose The browser is currently being used experimentally to: Explain poker rules directly + * within the game Display help pages or documentation Play videos (e.g., tutorials or explanations) * via platforms such as YouTube * - *

Security Mechanisms Since external websites can be loaded, some basic - * protective measures have been integrated: - Mandatory HTTPS for websites - Whitelist for known domains - - * Warning for unknown websites - JavaScript disabled by default (but can be enabled for - * Google, etc.) - Pop-up blocker - Automatic cookie deletion upon closing + *

Security Mechanisms Since external websites can be loaded, some basic protective measures have + * been integrated: - Mandatory HTTPS for websites - Whitelist for known domains - Warning for + * unknown websites - JavaScript disabled by default (but can be enabled for Google, etc.) - Pop-up + * blocker - Automatic cookie deletion upon closing */ public class CasinoBrowserController { @@ -112,8 +111,8 @@ public class CasinoBrowserController { /** * Opens a new browser window and loads a specified webpage. * - *

If the webpage is not on the list of trusted domains, the user - * will be asked whether the page should be loaded anyway. + *

If the webpage is not on the list of trusted domains, the user will be asked whether the + * page should be loaded anyway. * * @param url the URL of the webpage to be loaded */ @@ -212,7 +211,8 @@ public class CasinoBrowserController { var stream = CasinoBrowserController.class.getResourceAsStream(LOGO_PATH); Image logo = new Image(stream); - // Variable ‘streamM’ abbreviated to comply with the 100-character limit (LineLength) + // Variable ‘streamM’ abbreviated to comply with the 100-character + // limit (LineLength) var streamM = CasinoBrowserController.class.getResourceAsStream(LOGO_PATH_MAIN); Image logomain = new Image(streamM); @@ -455,12 +455,12 @@ public class CasinoBrowserController { /** * Loads a URL in the browser after performing basic security checks. * - *

Before loading a page, the following checks are performed: - Verification of the - * protocol (only HTTPS allowed) - Verification of the domain against a whitelist - Protection against + *

Before loading a page, the following checks are performed: - Verification of the protocol + * (only HTTPS allowed) - Verification of the domain against a whitelist - Protection against * domain spoofing * - *

If a domain is not classified as trustworthy, the user must - * confirm that the page may still be opened. + *

If a domain is not classified as trustworthy, the user must confirm that the page may + * still be opened. * * @param engine the browser's WebEngine renderer * @param url the web address to be loaded 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 7ca4a98..233cd98 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 @@ -13,9 +13,8 @@ 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 stakes, - Control of general - * menu functions such as Exit. + *

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 { @@ -37,8 +36,8 @@ public class TaskbarController { private static final int CREDIT_STEP = 5; /** - * Called when the taskbar is clicked with the mouse. Saves the relative - * position for later, correct repositioning. + * Called when the taskbar is clicked with the mouse. Saves the relative position for later, + * correct repositioning. * * @param event The mouse event */ @@ -49,11 +48,10 @@ public class TaskbarController { } /** - * Called while dragging the taskbar with the mouse. Updates the position - * and slightly scales the taskbar for visual feedback. + * 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 */ @@ -67,8 +65,8 @@ public class TaskbarController { } /** - * Called when the mouse cursor is released over the taskbar. Resets the - * taskbar scaling to normal size. + * Called when the mouse cursor is released over the taskbar. Resets the taskbar scaling to + * normal size. * * @param event The mouse event */ @@ -91,8 +89,8 @@ public class TaskbarController { } /** - * Called when the submit button in the taskbar is pressed. Triggers the - * processing of the deployment. + * Called when the submit button in the taskbar is pressed. Triggers the processing of the + * deployment. */ @FXML private void onInputSubmittedAction() { @@ -117,9 +115,9 @@ 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 displayed on the console. + * 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() { String input = taskbarInput.getText(); @@ -141,8 +139,8 @@ public class TaskbarController { /** * Opens the integrated Casono web browser. * - *

TODO: Replace the start URL with the official project website - * (e.g., Tips & Tricks page) once the content for strategies and support is available. + *

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 private void onBrowserButtonClick() { diff --git a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/domain/game/deck/Deck.java b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/domain/game/deck/Deck.java index f75a738..2e2c6c9 100644 --- a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/domain/game/deck/Deck.java +++ b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/domain/game/deck/Deck.java @@ -51,8 +51,8 @@ public class Deck { } /** - * Sets the cards of the deck. This method replaces the internal list - * with a copy of the provided list. + * Sets the cards of the deck. This method replaces the internal list with a copy of the + * provided list. * * @param cards the new list of cards to set */