35 lines
809 B
Java
35 lines
809 B
Java
package domain;
|
|
|
|
public class Player {
|
|
int playerNumber;
|
|
String name;
|
|
String color;
|
|
int score;
|
|
Sheet sheet;
|
|
|
|
public Player(int playerNumber, String name, String color, int score) {
|
|
this.playerNumber = playerNumber;
|
|
this.name = name;
|
|
this.color = color;
|
|
this.score = score;
|
|
this.sheet = new Sheet();
|
|
}
|
|
|
|
|
|
public void newSheet(){
|
|
this.sheet = new Sheet();
|
|
}
|
|
|
|
public Sheet getSheet(){
|
|
return this.sheet;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
String ANSI_RESET = "\u001B[0m";
|
|
String coloredName = String.format(this.color + this.name + ANSI_RESET);
|
|
// return String.format("Player %d: %s", this.playerNumber, coloredName);
|
|
return String.format("%s", coloredName);
|
|
}
|
|
}
|