diff options
Diffstat (limited to 'backend/src/main/java')
-rw-r--r-- | backend/src/main/java/org/luxons/sevenwonders/actions/PrepareCardAction.java | 3 | ||||
-rw-r--r-- | backend/src/main/java/org/luxons/sevenwonders/game/api/PlayerMove.java | 24 |
2 files changed, 17 insertions, 10 deletions
diff --git a/backend/src/main/java/org/luxons/sevenwonders/actions/PrepareCardAction.java b/backend/src/main/java/org/luxons/sevenwonders/actions/PrepareCardAction.java index b333d6c1..2fa857ad 100644 --- a/backend/src/main/java/org/luxons/sevenwonders/actions/PrepareCardAction.java +++ b/backend/src/main/java/org/luxons/sevenwonders/actions/PrepareCardAction.java @@ -1,9 +1,12 @@ package org.luxons.sevenwonders.actions; +import javax.validation.constraints.NotNull; + import org.luxons.sevenwonders.game.api.PlayerMove; public class PrepareCardAction { + @NotNull private PlayerMove move; public PlayerMove getMove() { diff --git a/backend/src/main/java/org/luxons/sevenwonders/game/api/PlayerMove.java b/backend/src/main/java/org/luxons/sevenwonders/game/api/PlayerMove.java index 6d2889e0..28b64fbb 100644 --- a/backend/src/main/java/org/luxons/sevenwonders/game/api/PlayerMove.java +++ b/backend/src/main/java/org/luxons/sevenwonders/game/api/PlayerMove.java @@ -3,24 +3,20 @@ package org.luxons.sevenwonders.game.api; import java.util.ArrayList; import java.util.List; +import javax.validation.constraints.NotNull; + import org.luxons.sevenwonders.game.moves.MoveType; import org.luxons.sevenwonders.game.resources.BoughtResources; public class PlayerMove { - private String cardName; - + @NotNull private MoveType type; - private List<BoughtResources> boughtResources = new ArrayList<>(); - - public String getCardName() { - return cardName; - } + @NotNull + private String cardName; - public void setCardName(String cardName) { - this.cardName = cardName; - } + private List<BoughtResources> boughtResources = new ArrayList<>(); public MoveType getType() { return type; @@ -30,6 +26,14 @@ public class PlayerMove { this.type = type; } + public String getCardName() { + return cardName; + } + + public void setCardName(String cardName) { + this.cardName = cardName; + } + public List<BoughtResources> getBoughtResources() { return boughtResources; } |