Merge pull request #21
Add: PlayerTest.java Added Javadoc For "addPrestige", "removePrestige" + Minor Fixes.
This commit is contained in:
@@ -96,6 +96,7 @@ public class Player {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The current amount of {@code Food} the Player possesses.
|
* The current amount of {@code Food} the Player possesses.
|
||||||
|
* Cannot be negative.
|
||||||
*/
|
*/
|
||||||
private int FoodValue;
|
private int FoodValue;
|
||||||
|
|
||||||
@@ -163,11 +164,27 @@ public class Player {
|
|||||||
return true;
|
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){
|
public void addPrestige(int Value){
|
||||||
|
|
||||||
this.PrestigeValue += 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){
|
public void removePrestige(int Value){
|
||||||
|
|
||||||
this.PrestigeValue -= Value;
|
this.PrestigeValue -= Value;
|
||||||
|
|||||||
Reference in New Issue
Block a user