From 5bbc7237b306da10c8d798cc9af22c8936b1b3c1 Mon Sep 17 00:00:00 2001 From: jbion Date: Wed, 21 Dec 2016 22:12:06 +0100 Subject: Add playerIndex and validation method to the Move itself --- src/main/java/org/luxons/sevenwonders/game/Move.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/org/luxons/sevenwonders/game/Move.java b/src/main/java/org/luxons/sevenwonders/game/Move.java index 6bb857f6..ed9dfa07 100644 --- a/src/main/java/org/luxons/sevenwonders/game/Move.java +++ b/src/main/java/org/luxons/sevenwonders/game/Move.java @@ -3,16 +3,27 @@ package org.luxons.sevenwonders.game; import java.util.HashMap; import java.util.Map; +import org.luxons.sevenwonders.game.api.Table; import org.luxons.sevenwonders.game.resources.Resources; public class Move { + private int playerIndex; + private String cardName; private MoveType moveType; private Map boughtResources = new HashMap<>(); + public int getPlayerIndex() { + return playerIndex; + } + + public void setPlayerIndex(int playerIndex) { + this.playerIndex = playerIndex; + } + public String getCardName() { return cardName; } @@ -36,4 +47,9 @@ public class Move { public void setBoughtResources(Map boughtResources) { this.boughtResources = boughtResources; } + + public boolean isValid(Table table) { + // TODO + return false; + } } -- cgit