Dev: added additional info to some classes for easy debug;

This commit is contained in:
Oleg Agafonov 2021-03-07 17:16:54 +04:00
parent bde6222ea6
commit 0e916b6e29
19 changed files with 133 additions and 19 deletions

View file

@ -3476,4 +3476,14 @@ public abstract class GameImpl implements Game, Serializable {
return gameStopped;
}
@Override
public String toString() {
Player activePayer = this.getPlayer(this.getActivePlayerId());
StringBuilder sb = new StringBuilder()
.append(this.getGameType().toString())
.append("; ").append(CardUtil.getTurnInfo(this))
.append("; active: ").append((activePayer == null ? "none" : activePayer.getName()))
.append("; stack: ").append(this.getStack().toString());
return sb.toString();
}
}