Add: JavaDoc for Artist class

This commit is contained in:
MatteoPellegrino05
2026-04-12 16:17:10 +02:00
parent 644c1bc55d
commit 21c1a6353b
@@ -7,26 +7,52 @@ import it.polimi.ingsw.gc14.Model.Player;
public class Artist extends Character {
/**
* Creates an Artist character card with the specified era.
*
* param Era artist era
* @param Era the era of the Artist card
*/
public Artist(int Era) {
super(Era, CharacterType.ARTIST);
}
/**
* Creates an Artist character card with the specified Era and minimum number of players.
*
* @param Era the era of the Artist card
* @param nMin the minimum number of players required for the card
*/
public Artist(int Era,int nMin) {
super(Era, CharacterType.ARTIST,nMin);
}
/**
* Returns the string representation of this Artist card.
*
* @return the string representation of this Artist card
*/
@Override
public String toString() {
return super.toString();
}
/**
* Creates and returns a copy of this Artist card.
*
* @return a clone of this Artist card
*/
@Override
public Character clone() {
return new Artist(getEra(), getNMin());
}
/**
* Inserts this Artist card into the specified player's Artist collection.
*
* @param player the player who receives the card
*/
@Override
public void insert(Player player) {
player.artists.add(this);