diff options
Diffstat (limited to 'backend/src/main')
-rw-r--r-- | backend/src/main/java/org/luxons/sevenwonders/game/api/PlayerTurnInfo.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/backend/src/main/java/org/luxons/sevenwonders/game/api/PlayerTurnInfo.java b/backend/src/main/java/org/luxons/sevenwonders/game/api/PlayerTurnInfo.java index c4cea17f..ccb045c2 100644 --- a/backend/src/main/java/org/luxons/sevenwonders/game/api/PlayerTurnInfo.java +++ b/backend/src/main/java/org/luxons/sevenwonders/game/api/PlayerTurnInfo.java @@ -8,7 +8,7 @@ public class PlayerTurnInfo { private final Table table; - private int currentAge; + private final int currentAge; private Action action; @@ -19,6 +19,7 @@ public class PlayerTurnInfo { public PlayerTurnInfo(int playerIndex, Table table) { this.playerIndex = playerIndex; this.table = table; + this.currentAge = table.getCurrentAge(); } public int getPlayerIndex() { @@ -33,10 +34,6 @@ public class PlayerTurnInfo { return currentAge; } - public void setCurrentAge(int currentAge) { - this.currentAge = currentAge; - } - public List<HandCard> getHand() { return hand; } @@ -60,4 +57,9 @@ public class PlayerTurnInfo { public void setMessage(String message) { this.message = message; } + + @Override + public String toString() { + return "PlayerTurnInfo{" + "playerIndex=" + playerIndex + ", action=" + action + ", hand=" + hand + '}'; + } } |