Add: PlayerTest.java Added Javadoc For The Constructor.
This commit is contained in:
@@ -192,6 +192,17 @@ public class Player {
|
||||
// endregion setters
|
||||
|
||||
// region Constructors
|
||||
|
||||
/**
|
||||
* 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}
|
||||
* with message:
|
||||
* <pre>{@code UserName is empty or exceeds maximum permitted length.}<pre>
|
||||
*
|
||||
* @see #UserName
|
||||
* @see #MAX_VALUE
|
||||
*/
|
||||
public Player(String UserName) throws IllegalArgumentException {
|
||||
if(UserName.isEmpty() || UserName.length() > MAX_VALUE) {
|
||||
throw new IllegalArgumentException("UserName is empty or exceeds maximum permitted length.");
|
||||
@@ -212,5 +223,6 @@ public class Player {
|
||||
// endregion constructors
|
||||
|
||||
// region Functions
|
||||
// TODO tostring usr + food + prestige \n tab foreach(characters.cards + spazio)
|
||||
// endregion functions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user