Add: PlayerTest.java Added Javadoc For "FoodValue" And "getFoodValue" + Minor Fixes.
This commit is contained in:
@@ -26,7 +26,7 @@ public class Player {
|
||||
|
||||
/**
|
||||
* Getter for the private attribute {@link #UserName}.
|
||||
* @return String
|
||||
* @return {@code String} - The UserName
|
||||
*/
|
||||
public String getUserName() {
|
||||
return UserName;
|
||||
@@ -34,8 +34,8 @@ public class Player {
|
||||
|
||||
/**
|
||||
* Counts the total {@link it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character Character Cards}
|
||||
* the player currently posses.
|
||||
* @return int
|
||||
* the player currently possesses.
|
||||
* @return {@code int} - Total Character Cards.
|
||||
*/
|
||||
public int getTotCharacters() {
|
||||
return Arrays.stream(CharacterType.values())
|
||||
@@ -47,7 +47,7 @@ public class Player {
|
||||
* 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
|
||||
* @return {@code int} - Total number of cards of given {@code type}.
|
||||
*/
|
||||
public int getNType(CharacterType type) {
|
||||
return switch (type) {
|
||||
@@ -60,41 +60,49 @@ public class Player {
|
||||
};
|
||||
}
|
||||
/**
|
||||
* The List containing all {@link BuildingCard Building Cards} the player currently posses.
|
||||
* The List containing all {@link BuildingCard Building Cards} the player currently possesses.
|
||||
*/
|
||||
public ArrayList <BuildingCard> buildingCards;
|
||||
|
||||
/**
|
||||
* The List containing all {@link Artist Artist Character Cards} the player currently posses.
|
||||
* The List containing all {@link Artist Artist Character Cards} the player currently possesses.
|
||||
*/
|
||||
public ArrayList <Artist> artists;
|
||||
|
||||
/**
|
||||
* The List containing all {@link Builder Builder Character Cards} the player currently posses.
|
||||
* The List containing all {@link Builder Builder Character Cards} the player currently possesses.
|
||||
*/
|
||||
public ArrayList <Builder> builders;
|
||||
|
||||
/**
|
||||
* The List containing all {@link Inventor Inventor Character Cards} the player currently posses.
|
||||
* The List containing all {@link Inventor Inventor Character Cards} the player currently possesses.
|
||||
*/
|
||||
public ArrayList <Inventor> inventors;
|
||||
|
||||
/**
|
||||
* The List containing all {@link Gatherer Gatherer Character Cards} the player currently posses.
|
||||
* The List containing all {@link Gatherer Gatherer Character Cards} the player currently possesses.
|
||||
*/
|
||||
public ArrayList <Gatherer> gatherers;
|
||||
|
||||
/**
|
||||
* The List containing all {@link Shaman Shaman Character Cards} the player currently posses.
|
||||
* The List containing all {@link Shaman Shaman Character Cards} the player currently possesses.
|
||||
*/
|
||||
public ArrayList <Shaman> shamans;
|
||||
|
||||
/**
|
||||
* The List containing all {@link Hunter Hunter Character Cards} the player currently posses.
|
||||
* The List containing all {@link Hunter Hunter Character Cards} the player currently possesses.
|
||||
*/
|
||||
public ArrayList <Hunter> hunters;
|
||||
|
||||
/**
|
||||
* The current amount of {@code food} the Player possesses.
|
||||
*/
|
||||
private int FoodValue;
|
||||
|
||||
/**
|
||||
* Getter for the private attribute {@link #FoodValue}.
|
||||
* @return {@code int} - The amount of food the player possesses.
|
||||
*/
|
||||
public int getFoodValue() {
|
||||
return FoodValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user