From d8dae8e78c00767ebb8aa184f5cd490845acc327 Mon Sep 17 00:00:00 2001 From: MatteoPellegrino05 Date: Sun, 12 Apr 2026 18:31:58 +0200 Subject: [PATCH 1/4] Add: JavaDoc for Building10 --- .../Cards/Building/Effects/Building10.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) 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 8411c31..0082a23 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 @@ -9,15 +9,39 @@ import it.polimi.ingsw.gc14.Model.Player; import java.util.HashMap; public class Building10 extends BuildingCard { + + /** + * Creates a Building10 card with the specified era, price, and prestige value. + * + * @param era the era of the building card + * @param price the price of the building card + * @param prestigeValue the prestige value of the building card + */ public Building10(int era, int price,int prestigeValue) { super(era,price,prestigeValue); effectType= EffectType.FINAL; effectId=10; } + + /** + * Creates and returns a copy of this Building10 card. + * + * @return a clone of this Building10 card + */ @Override public BuildingCard clone() { return new Building10(getEra(),getPrice(),getPrestigeValue()); } + + /** + * Applies the effect of this building card to the specified player. + * The effect grants 6 prestige points for each complete set of character cards + * owned by the player, where a complete set contains one card of each + * {@link CharacterType}. + * + * @param player the player to whom the effect is applied + * @throws IllegalArgumentException if the player does not own this building card + */ @Override public void applyEffect(Player player) throws IllegalArgumentException { if(!player.buildingCards.contains(this)) From 690cc9af50d77713e700ef0cbbcca6c6143484ee Mon Sep 17 00:00:00 2001 From: MatteoPellegrino05 Date: Sun, 12 Apr 2026 18:36:39 +0200 Subject: [PATCH 2/4] Add: JavaDoc for Building11 --- .../Cards/Building/Effects/Building11.java | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) 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 cc4de12..a14cdcd 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 @@ -9,11 +9,32 @@ import java.util.ArrayList; public class Building11 extends BuildingCard { private CharacterType icon ; + + /** + * Returns the CharacterType associated with this building card effect. + * + * @return the CharacterType associated with this building card effect + */ public CharacterType getIcon() {return icon;} private int PrestigeMul; + + /** + * Returns the prestige multiplier associated with this building card effect. + * + * @return the prestige multiplier associated with this building card effect + */ public int getPrestigeMul() {return PrestigeMul;} - + /** + * Creates a Building11 card with the specified era, price, prestige value, + * character type icon, and prestige multiplier. + * + * @param era the era of the building card + * @param price the price of the building card + * @param prestigeValue the prestige value of the building card + * @param icon the CharacterType associated with the building card effect + * @param prestigeMul the prestige multiplier of the building card effect + */ public Building11(int era, int price,int prestigeValue, CharacterType icon, int prestigeMul) { super(era,price,prestigeValue); effectType = EffectType.FINAL; @@ -21,10 +42,25 @@ public class Building11 extends BuildingCard { this.icon = icon; this.PrestigeMul = prestigeMul; } + + /** + * Creates and returns a copy of this Building11 card. + * + * @return a clone of this Building11 card + */ @Override public BuildingCard clone() { return new Building11(getEra(),getPrice(),getPrestigeValue(), getIcon(), getPrestigeMul()); } + + /** + * Applies the effect of this building card to the specified player. + * The effect grants prestige points equal to the number of cards of the + * associated CharacterType owned by the player, multiplied by the prestige multiplier. + * + * @param player the player to whom the effect is applied + * @throws IllegalArgumentException if the player does not own this building card + */ @Override public void applyEffect(Player player) throws IllegalArgumentException { if(!player.buildingCards.contains(this)) From c6b96cf4eb8bf2409f5ee2130ec3386f5de7bd57 Mon Sep 17 00:00:00 2001 From: MatteoPellegrino05 Date: Sun, 12 Apr 2026 18:42:05 +0200 Subject: [PATCH 3/4] Add: JavaDoc for Building13 --- .../Cards/Building/Effects/Building13.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) 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 852a21f..9012d4d 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 @@ -5,15 +5,36 @@ import it.polimi.ingsw.gc14.Model.Cards.BuildingCard; import it.polimi.ingsw.gc14.Model.Player; public class Building13 extends BuildingCard{ + + /** + * Creates a Building13 card with the specified era, price, and prestige value. + * + * @param era the era of the building card + * @param price the price of the building card + * @param prestigeValue the prestige value of the building card + */ public Building13(int era, int price,int prestigeValue) { super(era,price,prestigeValue); effectType= EffectType.FINAL; effectId=13; } + + /** + * Creates and returns a copy of this Building13 card. + * + * @return a clone of this Building13 card + */ @Override public BuildingCard clone() { return new Building13(getEra(),getPrice(),getPrestigeValue()); } + + /** + * Applies the effect of this building card to the specified player. + * + * @param player the player to whom the effect is applied + * @throws IllegalArgumentException if the player does not own this building card + */ @Override public void applyEffect(Player player) throws IllegalArgumentException { if(!player.buildingCards.contains(this)) From 144d26f03be5e72829a3a88010ca36806e89eb22 Mon Sep 17 00:00:00 2001 From: GabrieleRadice <265572328+GabrieleRadice@users.noreply.github.com> Date: Sun, 12 Apr 2026 19:02:41 +0200 Subject: [PATCH 4/4] Fix: Building10.java, Building11.java, Building13.java Fixed Typos. --- .../Cards/Building/Effects/Building10.java | 17 +++++++------- .../Cards/Building/Effects/Building11.java | 22 +++++++++---------- .../Cards/Building/Effects/Building13.java | 12 +++++----- 3 files changed, 24 insertions(+), 27 deletions(-) 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 0082a23..6c71f51 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 @@ -2,7 +2,6 @@ package it.polimi.ingsw.gc14.Model.Cards.Building.Effects; import it.polimi.ingsw.gc14.Model.Cards.Building.EffectType; import it.polimi.ingsw.gc14.Model.Cards.BuildingCard; -import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character; import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType; import it.polimi.ingsw.gc14.Model.Player; @@ -13,9 +12,9 @@ public class Building10 extends BuildingCard { /** * Creates a Building10 card with the specified era, price, and prestige value. * - * @param era the era of the building card - * @param price the price of the building card - * @param prestigeValue the prestige value of the building card + * @param era the era of the building card. + * @param price the price of the building card. + * @param prestigeValue the prestige value of the building card. */ public Building10(int era, int price,int prestigeValue) { super(era,price,prestigeValue); @@ -26,7 +25,7 @@ public class Building10 extends BuildingCard { /** * Creates and returns a copy of this Building10 card. * - * @return a clone of this Building10 card + * @return a clone of this Building10 card. */ @Override public BuildingCard clone() { @@ -35,12 +34,12 @@ public class Building10 extends BuildingCard { /** * Applies the effect of this building card to the specified player. - * The effect grants 6 prestige points for each complete set of character cards - * owned by the player, where a complete set contains one card of each + * The effect grants 6 prestige points for each complete set of character cards. + * owned by the player, where a complete set contains one card of each. * {@link CharacterType}. * - * @param player the player to whom the effect is applied - * @throws IllegalArgumentException if the player does not own this building card + * @param player the player to whom the effect is applied. + * @throws IllegalArgumentException if the player does not own this building card. */ @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 a14cdcd..512b06f 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 @@ -5,15 +5,13 @@ import it.polimi.ingsw.gc14.Model.Cards.BuildingCard; import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType; import it.polimi.ingsw.gc14.Model.Player; -import java.util.ArrayList; - public class Building11 extends BuildingCard { private CharacterType icon ; /** * Returns the CharacterType associated with this building card effect. * - * @return the CharacterType associated with this building card effect + * @return the CharacterType associated with this building card effect. */ public CharacterType getIcon() {return icon;} private int PrestigeMul; @@ -21,7 +19,7 @@ public class Building11 extends BuildingCard { /** * Returns the prestige multiplier associated with this building card effect. * - * @return the prestige multiplier associated with this building card effect + * @return the prestige multiplier associated with this building card effect. */ public int getPrestigeMul() {return PrestigeMul;} @@ -29,11 +27,11 @@ public class Building11 extends BuildingCard { * Creates a Building11 card with the specified era, price, prestige value, * character type icon, and prestige multiplier. * - * @param era the era of the building card - * @param price the price of the building card - * @param prestigeValue the prestige value of the building card - * @param icon the CharacterType associated with the building card effect - * @param prestigeMul the prestige multiplier of the building card effect + * @param era the era of the building card. + * @param price the price of the building card. + * @param prestigeValue the prestige value of the building card. + * @param icon the CharacterType associated with the building card effect. + * @param prestigeMul the prestige multiplier of the building card effect. */ public Building11(int era, int price,int prestigeValue, CharacterType icon, int prestigeMul) { super(era,price,prestigeValue); @@ -46,7 +44,7 @@ public class Building11 extends BuildingCard { /** * Creates and returns a copy of this Building11 card. * - * @return a clone of this Building11 card + * @return a clone of this Building11 card. */ @Override public BuildingCard clone() { @@ -58,8 +56,8 @@ public class Building11 extends BuildingCard { * The effect grants prestige points equal to the number of cards of the * associated CharacterType owned by the player, multiplied by the prestige multiplier. * - * @param player the player to whom the effect is applied - * @throws IllegalArgumentException if the player does not own this building card + * @param player the player to whom the effect is applied- + * @throws IllegalArgumentException if the player does not own this building card- */ @Override public void applyEffect(Player player) throws IllegalArgumentException { 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 9012d4d..1559865 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 @@ -9,9 +9,9 @@ public class Building13 extends BuildingCard{ /** * Creates a Building13 card with the specified era, price, and prestige value. * - * @param era the era of the building card - * @param price the price of the building card - * @param prestigeValue the prestige value of the building card + * @param era the era of the building card. + * @param price the price of the building card. + * @param prestigeValue the prestige value of the building card. */ public Building13(int era, int price,int prestigeValue) { super(era,price,prestigeValue); @@ -22,7 +22,7 @@ public class Building13 extends BuildingCard{ /** * Creates and returns a copy of this Building13 card. * - * @return a clone of this Building13 card + * @return a clone of this Building13 card. */ @Override public BuildingCard clone() { @@ -32,8 +32,8 @@ public class Building13 extends BuildingCard{ /** * Applies the effect of this building card to the specified player. * - * @param player the player to whom the effect is applied - * @throws IllegalArgumentException if the player does not own this building card + * @param player the player to whom the effect is applied. + * @throws IllegalArgumentException if the player does not own this building card. */ @Override public void applyEffect(Player player) throws IllegalArgumentException {