docs: refine JavaDoc for model, board and order classes

This commit is contained in:
MatteoPellegrino05
2026-05-20 17:42:42 +02:00
parent 78a3edddf9
commit b01ffd62b8
11 changed files with 63 additions and 45 deletions
@@ -149,15 +149,16 @@ public class Player implements Serializable {
/**
* 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.
* Note: {@link #FoodValue} cannot be negative, so the method returns
* {@code false} if {@code Value} is greater than the amount of {@code Food}
* the Player possesses, and {@code true} 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.
* @return {@code Boolean} - {@code true} if the Food is successfully removed,
* {@code false} otherwise.
* @see #FoodValue
*/
public Boolean removeFood(int Value){
@@ -200,10 +201,11 @@ public class Player implements Serializable {
/**
* Constructor for the class {@code Player}. Each Player is uniquely identified by the {@link #UserName}.
*
* @param UserName Unique String identifier for a Player.
* @throws IllegalArgumentException When {@code UserName} is {@code null} or exceeds {@link #MAX_VALUE}
* @throws IllegalArgumentException when {@code UserName} is empty or exceeds {@link #MAX_VALUE},
* with message:
* <pre>{@code UserName is empty or exceeds maximum permitted length.}<pre>
* <pre>{@code UserName is empty or exceeds maximum permitted length.}</pre>
*
* @see #UserName
* @see #MAX_VALUE
@@ -336,4 +338,4 @@ public class Player implements Serializable {
return table.build();
}
// endregion functions
}
}