Add: Added Totems.java Enum And Relevant Attribute "totem", Getter "getTotem" and "setTotem" Methods In Player.java.
Add: Added Relative Javadoc.
This commit is contained in:
@@ -20,6 +20,12 @@ public class Player implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private static final int MAX_VALUE = 32;
|
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
|
// region Getters
|
||||||
/**
|
/**
|
||||||
* Unique string identifier for players; must not be {@code null} and must not
|
* 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() {
|
public int getPrestigeValue() {
|
||||||
return PrestigeValue;
|
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
|
// endregion getters
|
||||||
|
|
||||||
// region Setters
|
// region Setters
|
||||||
@@ -186,6 +201,14 @@ public class Player implements Serializable {
|
|||||||
|
|
||||||
this.PrestigeValue -= Value;
|
this.PrestigeValue -= Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setter for the private attribute {@link #totem Totem}.
|
||||||
|
* @see Totems
|
||||||
|
*/
|
||||||
|
private void setTotem(Totems totem){
|
||||||
|
this.totem = totem;
|
||||||
|
}
|
||||||
// endregion setters
|
// endregion setters
|
||||||
|
|
||||||
// region Constructors
|
// region Constructors
|
||||||
@@ -216,6 +239,7 @@ public class Player implements Serializable {
|
|||||||
this.buildingCards = new ArrayList<>();
|
this.buildingCards = new ArrayList<>();
|
||||||
this.FoodValue = 0;
|
this.FoodValue = 0;
|
||||||
this.PrestigeValue = 0;
|
this.PrestigeValue = 0;
|
||||||
|
this.totem = null;
|
||||||
}
|
}
|
||||||
// endregion constructors
|
// endregion constructors
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package it.polimi.ingsw.gc14.Model;
|
||||||
|
|
||||||
|
public enum Totems {
|
||||||
|
YELLOW, BLUE, ORANGE, WHITE, PURPLE
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user