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 c3eaf90..3e4b742 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/Player.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/Player.java @@ -20,6 +20,12 @@ public class Player implements Serializable { */ private static final int MAX_VALUE = 32; + /** + * Identifier for the {@code Player} when displaying the game through the GUI. + * @see Totems + */ + private Totems totem; + // region Getters /** * Unique string identifier for players; must not be {@code null} and must not @@ -124,6 +130,15 @@ public class Player implements Serializable { public int getPrestigeValue() { return PrestigeValue; } + + /** + * Getter for the private attribute {@link #totem Totem}. + * @return {@code Totems} - The Totem identifier for the Player. + * @see Totems + */ + public Totems getTotem() { + return totem; + } // endregion getters // region Setters @@ -186,6 +201,14 @@ public class Player implements Serializable { this.PrestigeValue -= Value; } + + /** + * Setter for the private attribute {@link #totem Totem}. + * @see Totems + */ + private void setTotem(Totems totem){ + this.totem = totem; + } // endregion setters // region Constructors @@ -216,6 +239,7 @@ public class Player implements Serializable { this.buildingCards = new ArrayList<>(); this.FoodValue = 0; this.PrestigeValue = 0; + this.totem = null; } // endregion constructors diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/Totems.java b/src/main/java/it/polimi/ingsw/gc14/Model/Totems.java new file mode 100644 index 0000000..ea459e1 --- /dev/null +++ b/src/main/java/it/polimi/ingsw/gc14/Model/Totems.java @@ -0,0 +1,5 @@ +package it.polimi.ingsw.gc14.Model; + +public enum Totems { + YELLOW, BLUE, ORANGE, WHITE, PURPLE +} \ No newline at end of file