mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Added current life info to turn info in game log.
This commit is contained in:
parent
3c695f09a9
commit
8674bbf10d
1 changed files with 17 additions and 1 deletions
|
@ -572,7 +572,23 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
|
|||
}
|
||||
|
||||
private boolean playTurn(Player player) {
|
||||
fireStatusEvent("Turn " + Integer.toString(state.getTurnNum()), true);
|
||||
StringBuilder sb = new StringBuilder("Turn ");
|
||||
sb.append(state.getTurnNum()).append(" (");
|
||||
int delimiter = this.getPlayers().size() - 1;
|
||||
for (Player gamePlayer : this.getPlayers().values()) {
|
||||
sb.append(gamePlayer.getLife());
|
||||
int poison = gamePlayer.getCounters().getCount(CounterType.POISON);
|
||||
if (poison > 0) {
|
||||
sb.append("[P:").append(poison).append("]");
|
||||
}
|
||||
if (delimiter > 0) {
|
||||
sb.append(" - ");
|
||||
delimiter--;
|
||||
}
|
||||
}
|
||||
sb.append(")");
|
||||
fireStatusEvent(sb.toString(), true);
|
||||
|
||||
if (checkStopOnTurnOption()) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue