Add: JavaDoc for Hunter class

This commit is contained in:
MatteoPellegrino05
2026-04-12 17:22:17 +02:00
parent 8efb3ac53f
commit f4d0dad8ec
@@ -8,36 +8,63 @@ public class Hunter extends Character {
private boolean icon;
/**
* Returns whether this Hunter card has the icon.
*
* @return Hunter specific icon
* @return {@code true} if this Hunter card has the icon, {@code false} otherwise
*/
public boolean getIcon() {
return icon;
}
/**
* Creates a Hunter character card with the specified era and icon value.
*
* @param Era hunter era
* @param icon hunter icon
* @param Era the era of the Hunter card
* @param icon the icon value of the Hunter card
*/
public Hunter(int Era, boolean icon) {
super(Era, CharacterType.HUNTER);
this.icon = icon;
}
/**
* Creates a Hunter character card with the specified era, icon value,
* and minimum number of players.
*
* @param Era the era of the Hunter card
* @param icon the icon value of the Hunter card
* @param nMin the minimum number of players required for the card
*/
public Hunter(int Era, boolean icon, int nMin) {
super(Era, CharacterType.HUNTER,nMin);
this.icon = icon;
}
/**
* Returns the string representation of this Hunter card.
*
* @return the string representation of this Hunter card
*/
@Override
public String toString() {
return super.toString() + "Icon: " + String.valueOf(icon);
}
/**
* Creates and returns a copy of this Hunter card.
*
* @return a clone of this Hunter card
*/
@Override
public Character clone() {
return new Hunter(getEra(), getIcon(), getNMin());
}
/**
* Inserts this Hunter card into the specified player's Hunter collection.
*
* @param player the player who receives the card
*/
@Override
public void insert(Player player) {
player.hunters.add(this);