From 9686424f389a1b6005f22863c2944bdd3fba8dcd Mon Sep 17 00:00:00 2001 From: MatteoPellegrino05 Date: Sun, 12 Apr 2026 17:39:56 +0200 Subject: [PATCH] Add: JavaDoc for Shaman class --- .../Cards/TribeCards/Characters/Shaman.java | 35 ++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Characters/Shaman.java b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Characters/Shaman.java index 6c71208..8fdce5c 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Characters/Shaman.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Characters/Shaman.java @@ -10,36 +10,63 @@ public class Shaman extends Character { private int icon; /** + * Returns the icon value of this Shaman card. * - * @return Shaman specific icon + * @return the icon value of this Shaman card */ public int getIcon() { return icon; } /** + * Creates a Shaman character card with the specified era and icon value. * - * @param Era shaman era - * @param icon shaman icon + * @param Era the era of the Shaman card + * @param icon the icon value of the Shaman card */ public Shaman(int Era, int icon) { super(Era, CharacterType.SHAMAN); this.icon = icon; } + + /** + * Creates a Shaman character card with the specified era, icon value, + * and minimum number of players. + * + * @param Era the era of the Shaman card + * @param icon the icon value of the Shaman card + * @param nMin the minimum number of players required for the card + */ public Shaman(int Era, int icon, int nMin) { super(Era, CharacterType.SHAMAN,nMin); this.icon = icon; } + + /** + * Returns the string representation of this Shaman card. + * + * @return the string representation of this Shaman card + */ @Override public String toString() { - return super.toString() + "icon: " + String.valueOf(icon); + return super.toString() + "Icon: " + String.valueOf(icon); } + /** + * Creates and returns a copy of this Shaman card. + * + * @return a clone of this Shaman card + */ @Override public Character clone() { return new Shaman(getEra(), getIcon(), getNMin()); } + /** + * Inserts this Shaman card into the specified player's Shaman collection. + * + * @param player the player who receives the card + */ @Override public void insert(Player player) {