summaryrefslogtreecommitdiff
path: root/game-engine/src/main/java
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2018-04-25 22:46:35 +0200
committerJoffrey BION <joffrey.bion@gmail.com>2018-04-25 22:46:35 +0200
commit5621fc44d31f4e5f3bbeca6132a6d22edb9f465f (patch)
tree89be3e9e34ecceb3e66abd598efe46a2bc0768df /game-engine/src/main/java
parentAdd WonderTest (diff)
downloadseven-wonders-5621fc44d31f4e5f3bbeca6132a6d22edb9f465f.tar.gz
seven-wonders-5621fc44d31f4e5f3bbeca6132a6d22edb9f465f.tar.bz2
seven-wonders-5621fc44d31f4e5f3bbeca6132a6d22edb9f465f.zip
Make wonder activation pay for requirements
Diffstat (limited to 'game-engine/src/main/java')
-rw-r--r--game-engine/src/main/java/org/luxons/sevenwonders/game/cards/Requirements.java2
-rw-r--r--game-engine/src/main/java/org/luxons/sevenwonders/game/wonders/WonderStage.java1
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);
}
}
bgstack15