Add: Added Javadoc For "toStringBoard" Method And "icon" Field In Hunter.java.

This commit is contained in:
GabrieleRadice
2026-04-30 17:32:04 +02:00
parent 76e3d19283
commit 3fa0f24e52
@@ -5,6 +5,12 @@ import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType;
import it.polimi.ingsw.gc14.Model.Player;
public class Hunter extends Character {
/**
* Describes whether the {@code Hunter Icon} is present or not. Whenever an
* {@code Hunter} with an {@code Hunter Icon} is added to the tribe, 1 {@code Food token} is awarded for each Hunter in the tribe
* (with or without an icon).
*/
private boolean icon;
/**
@@ -53,6 +59,17 @@ public class Hunter extends Character {
}
return toPrint;
}
/**
* Prints a string representation of this {@code TribeCard}. This specific variation is used in the {@code Game}'s
* toString to print a more detailed version.
* <p>Potentially includes:
* <li>{@link #icon Icon}
* </p>
* @return {@code String} - a string representation of this {@code TribeCard}.
* @see it.polimi.ingsw.gc14.Model.Cards.TribeCard TribeCard
* @see it.polimi.ingsw.gc14.Model.Game Game
*/
@Override
public String toStringBoard() {
String toPrint = super.toStringBoard();
@@ -62,7 +79,6 @@ public class Hunter extends Character {
return toPrint;
}
/**
* Creates and returns a copy of this Hunter card.
*