diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/Player.java b/src/main/java/it/polimi/ingsw/gc14/Model/Player.java index 7269f2c..32785a0 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/Player.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/Player.java @@ -22,7 +22,7 @@ public class Player { * exceed {@link #MAX_VALUE} otherwise an {@link IllegalArgumentException} will be thrown * when the {@link #Player(String) constructor} is called. */ - private String UserName; + private final String UserName; /** * Getter for the private attribute {@link #UserName}. @@ -33,7 +33,7 @@ public class Player { } /** - * Returns the total {@link it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character Character Cards} + * Counts the total {@link it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character Character Cards} * the player currently posses. * @return int */ @@ -42,6 +42,13 @@ public class Player { .mapToInt(this::getNType) .sum(); } + + /** + * Counts the total number of cards of the specified {@link it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType Character Type}. + * Character Type must not be {@code null} + * @param type the Character Type to be Counted. + * @return int + */ public int getNType(CharacterType type) { return switch (type) { case ARTIST -> artists.size();