Merge pull request #21

Add: PlayerTest.java Added Javadoc For "addPrestige", "removePrestige" + Minor Fixes.
This commit is contained in:
GabrieleRadice
2026-04-12 17:02:52 +02:00
committed by GitHub
@@ -96,6 +96,7 @@ public class Player {
/**
* The current amount of {@code Food} the Player possesses.
* Cannot be negative.
*/
private int FoodValue;
@@ -163,11 +164,27 @@ public class Player {
return true;
}
/**
* Adds {@code Value} amount of {@code Prestige} to the Player.
* @param Value The amount of {@code Prestige} to be added.
* Should be positive for expected results
* (otherwise the method will subtract the absolute
* value of {@code Value}).
* @see #PrestigeValue
*/
public void addPrestige(int Value){
this.PrestigeValue += Value;
}
/**
* Removes {@code Value} amount of {@code Prestige} to the Player.
* @param Value The amount of {@code Prestige} to be removed.
* Should be positive for expected results
* (otherwise the method will add the absolute
* value of {@code Value}).
* @see #PrestigeValue
*/
public void removePrestige(int Value){
this.PrestigeValue -= Value;