20 lines
603 B
Java
20 lines
603 B
Java
package de.joethei.monopoly.fields;
|
|
|
|
import de.joethei.monopoly.Monopoly;
|
|
import de.joethei.monopoly.Player;
|
|
import de.joethei.monopoly.action.Action;
|
|
import de.joethei.monopoly.action.ActionType;
|
|
|
|
public class Tax extends Field{
|
|
|
|
public Tax(String name, int tax) {
|
|
super(name);
|
|
getActions().add(new Action("Steuer zahlen", this, ActionType.REQUIRED) {
|
|
@Override
|
|
public void execute(Player player) {
|
|
Monopoly.getStatistics().get("tax").addAndGet(tax);
|
|
player.setMoney(player.getMoney() - tax);
|
|
}
|
|
});
|
|
}
|
|
} |