diff --git a/src/main/java/it/polimi/ingsw/gc14/ClientLauncherTUI.java b/src/main/java/it/polimi/ingsw/gc14/ClientLauncherTUI.java index 9aacd2a..001f2bb 100644 --- a/src/main/java/it/polimi/ingsw/gc14/ClientLauncherTUI.java +++ b/src/main/java/it/polimi/ingsw/gc14/ClientLauncherTUI.java @@ -303,7 +303,7 @@ public class ClientLauncherTUI { /** * Handles the {@code draw} command, dispatching to the appropriate controller draw method. * - * @param parts the tokenised command: {@code [draw, upper|lower, tribe|building, pos]}. + * @param parts the tokenized command: {@code [draw, upper|lower, tribe|building, pos]}. * @param controller the client controller to invoke. */ private void handleDraw(String[] parts, ClientController controller) { @@ -331,7 +331,7 @@ public class ClientLauncherTUI { /** * Parses an integer position argument at {@code idx} in {@code parts}. * - * @param parts the tokenised command array. + * @param parts the tokenized command array. * @param idx index of the position argument. * @return the parsed integer, or {@code -1} if missing or malformed. */ diff --git a/src/main/java/it/polimi/ingsw/gc14/GameEventProcessor.java b/src/main/java/it/polimi/ingsw/gc14/GameEventProcessor.java index 33c18a5..a8aae23 100644 --- a/src/main/java/it/polimi/ingsw/gc14/GameEventProcessor.java +++ b/src/main/java/it/polimi/ingsw/gc14/GameEventProcessor.java @@ -21,7 +21,7 @@ import java.util.stream.Collectors; *
The three top-level states that determine routing are: *
If a previous timer is still pending it is cancelled first to avoid + *
If a previous timer is still pending it is canceled first to avoid * duplicate timers. * * @param event the event that was just applied. diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/Board.java b/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/Board.java index 5cc8b26..bbf4a9f 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/Board.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/Board.java @@ -221,7 +221,7 @@ public class Board implements Serializable { * Take the selected card from the upper tribe list of the board. * * @param tribeCard is the card to remove. - * @return true if the card is succesfully removed. + * @return true if the card is successfully removed. */ public boolean removeUpperTribeCard(TribeCard tribeCard) { return upperListTribe.remove(tribeCard); diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/CurrentState.java b/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/CurrentState.java index 6dfae60..4ec3017 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/CurrentState.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/CurrentState.java @@ -181,7 +181,7 @@ public class CurrentState implements Serializable { /** * Updates the current player, slot, and available draws. * If {@code slot} is {@code null}, both {@link #nUpper} and {@link #nLower} are reset to 0. - * Otherwise they are set from the slot's values. + * Otherwise, they are set from the slot's values. * * @param player the new current player. * @param slot the new current slot, or {@code null} when no slot is active. diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/OrderLogicCard.java b/src/main/java/it/polimi/ingsw/gc14/Model/OrderLogicCard.java index 921e77a..8b7e2e0 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/OrderLogicCard.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/OrderLogicCard.java @@ -42,7 +42,7 @@ public abstract class OrderLogicCard implements Serializable { * *
The input list is shuffled in place to establish a random initial turn order. * This is intentional: the caller's list (typically {@code Game.playersList}) is - * reordered so that the game's canonical player sequence reflects the randomised order. + * reordered so that the game's canonical player sequence reflects the randomized order. * * @param players the list of players associated with this order logic card. * The list is mutated (shuffled) by this constructor. diff --git a/src/main/java/it/polimi/ingsw/gc14/Network/InterfaceResolver.java b/src/main/java/it/polimi/ingsw/gc14/Network/InterfaceResolver.java index da7e099..8d845f4 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Network/InterfaceResolver.java +++ b/src/main/java/it/polimi/ingsw/gc14/Network/InterfaceResolver.java @@ -11,7 +11,7 @@ public class InterfaceResolver { * Returns the local IPv4 address that can reach the given server IP. * *
If the server is localhost, returns {@code "127.0.0.1"}. - * Otherwise iterates active non-loopback interfaces to find one on the same subnet; + * Otherwise, iterates active non-loopback interfaces to find one on the same subnet; * falls back to a UDP connect trick if no matching subnet is found. * * @param serverIp the server IP address or hostname. diff --git a/src/main/java/it/polimi/ingsw/gc14/Network/RMI/Client/RMIClient.java b/src/main/java/it/polimi/ingsw/gc14/Network/RMI/Client/RMIClient.java index 0081c92..ca3951f 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Network/RMI/Client/RMIClient.java +++ b/src/main/java/it/polimi/ingsw/gc14/Network/RMI/Client/RMIClient.java @@ -84,7 +84,7 @@ public class RMIClient implements IClient { *
Mirrors the {@code ScheduledExecutorService} in * {@code TCPClient.heartbeatLoop()} that writes {@code PING} every 3 s. * On {@link RemoteException} the server is considered gone and - * {@link #disconnect()} is called — mirrors the behaviour on + * {@link #disconnect()} is called — mirrors the behavior on * {@code SocketTimeoutException} / {@code IOException} in the TCP version. */ private void startHeartbeat() { diff --git a/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java b/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java index 0d61748..1009871 100644 --- a/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java +++ b/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java @@ -57,7 +57,7 @@ public class ServerLauncher { // ── Entry point ─────────────────────────────────────────────────────────── /** - * Initialises all server components, wires them together, restores a saved + * Initializes all server components, wires them together, restores a saved * game if available, and starts the event-processing loop and both network * servers. * @@ -145,7 +145,7 @@ public class ServerLauncher { * *
The save is discarded if all but at most one player was offline at the * time of the crash, since there would be nobody to resume the game with. - * Otherwise the model is restored, the player-list limit is set, and each + * Otherwise, the model is restored, the player-list limit is set, and each * player who was offline at crash time is pre-populated as offline so the * reconnection flow can handle them correctly. * diff --git a/src/main/java/it/polimi/ingsw/gc14/View/GUI/FireParticleSystem.java b/src/main/java/it/polimi/ingsw/gc14/View/GUI/FireParticleSystem.java index 2ef001f..4d65a07 100644 --- a/src/main/java/it/polimi/ingsw/gc14/View/GUI/FireParticleSystem.java +++ b/src/main/java/it/polimi/ingsw/gc14/View/GUI/FireParticleSystem.java @@ -14,7 +14,7 @@ import java.util.Random; /** * Ambient fire-particle effect rendered on a transparent overlay pane. * - *
Three particle types float from the screen corners toward the centre: + *
Three particle types float from the screen corners toward the center: *
If the server crashed, returns to the login scene and re-enables the login button. - * Otherwise delegates to the active scene's error display. + * Otherwise, delegates to the active scene's error display. * * @param error the error type. * @param message a human-readable description of the error. diff --git a/src/main/java/it/polimi/ingsw/gc14/View/GUI/TotemFXMLController.java b/src/main/java/it/polimi/ingsw/gc14/View/GUI/TotemFXMLController.java index 1da8c55..51c845e 100644 --- a/src/main/java/it/polimi/ingsw/gc14/View/GUI/TotemFXMLController.java +++ b/src/main/java/it/polimi/ingsw/gc14/View/GUI/TotemFXMLController.java @@ -212,7 +212,7 @@ public class TotemFXMLController { "-fx-text-fill: " + (selected ? "#FFD700" : "#ffffff") + ";"; } - /** Returns the totem name with only the first letter capitalised. */ + /** Returns the totem name with only the first letter capitalized. */ private String capitalize(Totems t) { String s = t.name().toLowerCase(Locale.ROOT); return Character.toUpperCase(s.charAt(0)) + s.substring(1); diff --git a/src/main/java/it/polimi/ingsw/gc14/View/TUI/AsciiTable.java b/src/main/java/it/polimi/ingsw/gc14/View/TUI/AsciiTable.java index 79e9ee3..1b6ac31 100644 --- a/src/main/java/it/polimi/ingsw/gc14/View/TUI/AsciiTable.java +++ b/src/main/java/it/polimi/ingsw/gc14/View/TUI/AsciiTable.java @@ -97,7 +97,7 @@ public class AsciiTable { return sb.toString(); } /** - * Builds a single horizontal border line across all columns. + * Builds a single horizontal borderline across all columns. * * @param l left-end character. * @param m middle junction character (between columns). @@ -105,6 +105,7 @@ public class AsciiTable { * @param maxWidth width in display columns of each cell (including padding). * @return the rendered horizontal line string. */ + @SuppressWarnings("GrazieInspection") private String hline(String l, String m, String r, int maxWidth) { var sb = new StringBuilder(l); for (int i = 0; i < cols; i++) { diff --git a/src/test/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Events/HuntTest.java b/src/test/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Events/HuntTest.java index 53809f3..6fb6b2f 100644 --- a/src/test/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Events/HuntTest.java +++ b/src/test/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Events/HuntTest.java @@ -86,7 +86,7 @@ class HuntTest { } @Test - @DisplayName("p2 doesnt have building 7") + @DisplayName("p2 doesn't have building 7") void activateEvent4() { Player p1 = new Player("Giacomo"); Player p2 = new Player("xiaomi"); diff --git a/src/test/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Events/SustenanceTest.java b/src/test/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Events/SustenanceTest.java index 9bcb7ce..cb65dec 100644 --- a/src/test/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Events/SustenanceTest.java +++ b/src/test/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Events/SustenanceTest.java @@ -20,7 +20,7 @@ class SustenanceTest { void testConstructor() { int era = 1; int prestigeDebt = 5; - // Gli attributi di Sustenance era e EventType vengono testati in EventCardTest. + // Gli attributi di Sustenance era ed EventType vengono testati in EventCardTest. Sustenance s = new Sustenance(era, prestigeDebt); assertEquals(prestigeDebt, s.getPrestigeDebt());