From 5c937e0fb48332f0a3e5114423359ccc9869154b Mon Sep 17 00:00:00 2001 From: Joffrey BION Date: Thu, 15 Dec 2016 00:41:18 +0100 Subject: Improve card requirements management - Add chain-related fields to the Card - Add helpers methods isAffordable, isPlayable and the likes - Remove the card addition to the board as it is supposed to be separately from applying the effect of the card --- src/test/java/org/luxons/sevenwonders/game/cards/CardTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/test/java/org') diff --git a/src/test/java/org/luxons/sevenwonders/game/cards/CardTest.java b/src/test/java/org/luxons/sevenwonders/game/cards/CardTest.java index 572a7ee4..62bf376d 100644 --- a/src/test/java/org/luxons/sevenwonders/game/cards/CardTest.java +++ b/src/test/java/org/luxons/sevenwonders/game/cards/CardTest.java @@ -12,7 +12,6 @@ import org.luxons.sevenwonders.game.effects.ProductionIncrease; import org.luxons.sevenwonders.game.resources.ResourceType; import org.luxons.sevenwonders.game.wonders.Wonder; -import static junit.framework.TestCase.assertTrue; import static org.junit.Assert.assertEquals; public class CardTest { @@ -40,7 +39,7 @@ public class CardTest { List effects = Collections.singletonList(treeFarmEffect); - treeFarmCard = new Card("Tree Farm", Color.BROWN, treeFarmRequirements, effects); + treeFarmCard = new Card("Tree Farm", Color.BROWN, treeFarmRequirements, "", effects, null); } @Test @@ -51,9 +50,8 @@ public class CardTest { @Test public void playCardCostingMoney() { board.setGold(3); - treeFarmCard.play(board, leftBoard, rightBoard); + treeFarmCard.applyTo(board, leftBoard, rightBoard); assertEquals(2, board.getGold()); - assertTrue(board.getPlayedCards().contains(treeFarmCard)); } } -- cgit