From 5621fc44d31f4e5f3bbeca6132a6d22edb9f465f Mon Sep 17 00:00:00 2001 From: Joffrey BION Date: Wed, 25 Apr 2018 22:46:35 +0200 Subject: Make wonder activation pay for requirements --- .../src/main/java/org/luxons/sevenwonders/game/cards/Requirements.java | 2 +- .../src/main/java/org/luxons/sevenwonders/game/wonders/WonderStage.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'game-engine/src/main') diff --git a/game-engine/src/main/java/org/luxons/sevenwonders/game/cards/Requirements.java b/game-engine/src/main/java/org/luxons/sevenwonders/game/cards/Requirements.java index 93683ff8..3f9c4409 100644 --- a/game-engine/src/main/java/org/luxons/sevenwonders/game/cards/Requirements.java +++ b/game-engine/src/main/java/org/luxons/sevenwonders/game/cards/Requirements.java @@ -111,7 +111,7 @@ public class Requirements { }); } - void pay(Table table, int playerIndex, List boughtResources) { + public void pay(Table table, int playerIndex, List boughtResources) { table.getBoard(playerIndex).removeGold(gold); payBoughtResources(table, playerIndex, boughtResources); } diff --git a/game-engine/src/main/java/org/luxons/sevenwonders/game/wonders/WonderStage.java b/game-engine/src/main/java/org/luxons/sevenwonders/game/wonders/WonderStage.java index 89b20383..a53e2694 100644 --- a/game-engine/src/main/java/org/luxons/sevenwonders/game/wonders/WonderStage.java +++ b/game-engine/src/main/java/org/luxons/sevenwonders/game/wonders/WonderStage.java @@ -49,5 +49,6 @@ public class WonderStage { void activate(Table table, int playerIndex, List boughtResources) { effects.forEach(e -> e.apply(table, playerIndex)); + requirements.pay(table, playerIndex, boughtResources); } } -- cgit