From b8dc59f779da2dcaa22c088542bdda865ca6de3d Mon Sep 17 00:00:00 2001 From: AleandroPagani Date: Tue, 21 Apr 2026 14:22:26 +0200 Subject: [PATCH] Fixed: JavaDOC small fixes to all buildings --- .../gc14/Model/Cards/Building/Effects/Building1.java | 8 ++++---- .../gc14/Model/Cards/Building/Effects/Building10.java | 6 +++--- .../gc14/Model/Cards/Building/Effects/Building11.java | 4 ++-- .../gc14/Model/Cards/Building/Effects/Building13.java | 4 ++-- .../gc14/Model/Cards/Building/Effects/Building4.java | 11 +++++------ .../gc14/Model/Cards/Building/Effects/Building8.java | 4 ++-- 6 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building1.java b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building1.java index 2a8d543..9dce61c 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building1.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building1.java @@ -9,18 +9,18 @@ import it.polimi.ingsw.gc14.Model.Player; import java.util.HashMap; /** - * During the Sustenance Event, you have a discount of 1 Food token on the total you - * would have to pay, for each of the indicated Characters in your tribe. + * During the Sustenance Event, you have a discount of 1 food token on the total you + * would have to pay, for each of the indicated characters in your tribe. */ public class Building1 extends BuildingCard { /** - * The icon parameter indicates the character's type involved in the building effect + * The icon attribute indicates the character type involved in the building effect. */ private CharacterType icon ; /** - * @return the icon attribute + * @return the character type associated with this building effect */ public CharacterType getIcon() {return icon;} diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building10.java b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building10.java index b883202..d212234 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building10.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building10.java @@ -10,7 +10,7 @@ import java.util.HashMap; /** - * At the end of the game, you gain 6 Prestige Points for each set of 6 different character cards in your tribe + * At the end of the game, you gain 6 Prestige Points for each set of 6 different character cards in your tribe. */ public class Building10 extends BuildingCard { @@ -36,10 +36,10 @@ public class Building10 extends BuildingCard { } /** - * Counts the number of different character sets and the player gains an amount of Prestige Points + * Counts the number of different character sets, and the player gains Prestige Points * equal to the number of sets multiplied by 6. * @param player the player who owns the building - * @throws IllegalArgumentException thrown if the player doesn't own this building + * @throws IllegalArgumentException thrown if the specified player does not own this building. */ @Override public void applyEffect(Player player) throws IllegalArgumentException { diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building11.java b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building11.java index 5278483..0741ece 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building11.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building11.java @@ -59,8 +59,8 @@ public class Building11 extends BuildingCard { } /** - * Calculates the number of indicated character type. - * Add an amount of Prestige Points equal to the number of characters times the prestige multiplier. + * Calculates the number of characters of the indicated type. + * Adds an amount of Prestige Points equal to the number of characters multiplied by the prestige multiplier. * @param player the player who owns the building * @throws IllegalArgumentException thrown if the specified player does not own this card. */ diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building13.java b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building13.java index 5fa69e1..9b21464 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building13.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building13.java @@ -31,9 +31,9 @@ public class Building13 extends BuildingCard{ } /** - * Add 25 Prestige Points to the player + * Adds 25 Prestige Points to the player * @param player the player who owns the building - * @throws IllegalArgumentException thrown if the player doesn't own this building + * @throws IllegalArgumentException thrown if the specified player does not own this building. */ @Override public void applyEffect(Player player) throws IllegalArgumentException { diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building4.java b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building4.java index df86b6f..3ff9a83 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building4.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building4.java @@ -8,9 +8,8 @@ import it.polimi.ingsw.gc14.Model.Player; import java.util.HashMap; /** - * From when you purchase this Building, every time you obtain a pair of identical - * Inventors, you gain 3 Food. - * This effect doesn't apply on already owned pairs at the time of purchase. + * From the moment you purchase this building, every time you obtain a pair of identical inventors, you gain 3 food. + * This effect doesn't apply to already owned pairs at the time of purchase. */ public class Building4 extends BuildingCard { @@ -20,7 +19,7 @@ public class Building4 extends BuildingCard { boolean purchased ; /** - * The numPair attribute indicates how many Inventors pairs the player has. + * The numPair attribute indicates how many pairs of inventors the player has. */ int numPair; @@ -37,9 +36,9 @@ public class Building4 extends BuildingCard { } /** - * Initializes the building by counting the number of Inventors pairs at the moment of purchase. + * Initializes the building by counting the number of pairs of inventors at the moment of purchase. * The building can only be initialized once. - * @param player the player who owns the building, whose cards are counted to determine the number of pairs. + * @param player the player who owns the building, whose inventors are counted to determine the number of pairs. */ public void initialize(Player player) { diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building8.java b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building8.java index d6af989..86509a1 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building8.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/Building/Effects/Building8.java @@ -33,9 +33,9 @@ public class Building8 extends BuildingCard { } /** - * For each builder in the player's hand, he gains double the Prestige Point indicated on the builder card. + * For each builder in the player's hand, the player gains double the Prestige Point indicated on the builder card. * @param player the player who owns the building - * @throws IllegalArgumentException thrown if the player doesn't own this building + * @throws IllegalArgumentException thrown if the specified player does not own this building. */ @Override public void applyEffect(Player player) throws IllegalArgumentException {