64 lines
1.4 KiB
Java
64 lines
1.4 KiB
Java
package de.joethei.monopoly;
|
|
|
|
import de.joethei.monopoly.colors.ConsoleColor;
|
|
import de.joethei.monopoly.colors.NormalColor;
|
|
import de.joethei.monopoly.fields.OwnableField;
|
|
|
|
import java.util.LinkedList;
|
|
import java.util.List;
|
|
|
|
public class Player {
|
|
private List<OwnableField> owning = new LinkedList<>();
|
|
private String name;
|
|
private int field;
|
|
private int jailFreeCards = 0;
|
|
private long money = 1000;
|
|
private ConsoleColor color;
|
|
|
|
Player(String name, ConsoleColor color) {
|
|
this.name = name;
|
|
this.color = color;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return color.getColorCode() + name + ": " + " | " + money + NormalColor.RESET.getColorCode();
|
|
}
|
|
|
|
public List<OwnableField> getOwning() {
|
|
return this.owning;
|
|
}
|
|
|
|
public String getName() {
|
|
return this.name;
|
|
}
|
|
|
|
public int getField() {
|
|
return this.field;
|
|
}
|
|
|
|
public int getJailFreeCards() {
|
|
return this.jailFreeCards;
|
|
}
|
|
|
|
public long getMoney() {
|
|
return this.money;
|
|
}
|
|
|
|
public ConsoleColor getColor() {
|
|
return this.color;
|
|
}
|
|
|
|
public void setField(int field) {
|
|
this.field = field;
|
|
}
|
|
|
|
public void setJailFreeCards(int jailFreeCards) {
|
|
this.jailFreeCards = jailFreeCards;
|
|
}
|
|
|
|
public void setMoney(long money) {
|
|
this.money = money;
|
|
}
|
|
}
|