diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2018-04-25 22:46:35 +0200 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2018-04-25 22:46:35 +0200 |
commit | 5621fc44d31f4e5f3bbeca6132a6d22edb9f465f (patch) | |
tree | 89be3e9e34ecceb3e66abd598efe46a2bc0768df /game-engine | |
parent | Add WonderTest (diff) | |
download | seven-wonders-5621fc44d31f4e5f3bbeca6132a6d22edb9f465f.tar.gz seven-wonders-5621fc44d31f4e5f3bbeca6132a6d22edb9f465f.tar.bz2 seven-wonders-5621fc44d31f4e5f3bbeca6132a6d22edb9f465f.zip |
Make wonder activation pay for requirements
Diffstat (limited to 'game-engine')
-rw-r--r-- | game-engine/src/main/java/org/luxons/sevenwonders/game/cards/Requirements.java | 2 | ||||
-rw-r--r-- | game-engine/src/main/java/org/luxons/sevenwonders/game/wonders/WonderStage.java | 1 |
2 files changed, 2 insertions, 1 deletions
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> boughtResources) { + public void pay(Table table, int playerIndex, List<BoughtResources> 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> boughtResources) { effects.forEach(e -> e.apply(table, playerIndex)); + requirements.pay(table, playerIndex, boughtResources); } } |