Fix: Player and PlayerTest Changed
This commit is contained in:
@@ -91,18 +91,13 @@ public class Player {
|
||||
|
||||
this.PrestigeValue -= Value;
|
||||
}
|
||||
|
||||
public void setUserName(String UserName) throws IllegalArgumentException{
|
||||
final int MAXLEN = 32;
|
||||
if(UserName.isEmpty() || UserName.length() > MAXLEN){
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
this.UserName = UserName;
|
||||
}
|
||||
// End setters
|
||||
|
||||
// Constructors
|
||||
public Player(String UserName){
|
||||
public Player(String UserName) throws IllegalArgumentException {
|
||||
if(UserName.isEmpty() || UserName.length() > 32) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
this.UserName = UserName;
|
||||
|
||||
this.inventors = new ArrayList <>();
|
||||
|
||||
Reference in New Issue
Block a user