From 21c1a6353bc9315640df056b8022897eb3ef738e Mon Sep 17 00:00:00 2001 From: MatteoPellegrino05 Date: Sun, 12 Apr 2026 16:17:10 +0200 Subject: [PATCH] Add: JavaDoc for Artist class --- .../Cards/TribeCards/Characters/Artist.java | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Characters/Artist.java b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Characters/Artist.java index 7c3cb8b..78453ff 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Characters/Artist.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/Cards/TribeCards/Characters/Artist.java @@ -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);