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 d5f2373..e379d46 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/Player.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/Player.java @@ -114,7 +114,7 @@ public class Player { /** * Getter for the private attribute {@link #PrestigeValue}. - * @return {@code int} - The amount of Prestige the player possesses. + * @return {@code int} - The amount of Prestige the Player possesses. */ public int getPrestigeValue() { return PrestigeValue; @@ -134,13 +134,27 @@ public class Player { * Adds {@code Value} amount of {@code Food} to the Player. * @param Value The amount of {@code Food} to be added. * Should be positive for expected results - * (otherwise the method will subtract {@code abs(Value)}). + * (otherwise the method will subtract the absolute + * value of {@code Value}). * @see #FoodValue */ public void addFood(int Value){ this.FoodValue += Value; } + /** + * Removes {@code Value} amount of {@code Food} from the Player. + * Note: {@link #FoodValue} cannot be negative, so the method will + * return {@code False} if {@code Value} is greater than the + * amount of {@code Food} the Player possesses, {@code False} otherwise. + * @param Value The amount of {@code Food} to be removed. + * Should be positive for expected results + * (otherwise the method will add the absolute + * value of {@code Value}). + * @return {@code Boolean} - {@code True} if {@code Value} is greater than + * the amount of {@code Food} the Player possesses, {@code False} otherwise. + * @see #FoodValue + */ public Boolean removeFood(int Value){ if(Value > this.FoodValue){ return false;