summaryrefslogtreecommitdiff
path: root/game-engine/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'game-engine/src/main/java')
-rw-r--r--game-engine/src/main/java/org/luxons/sevenwonders/game/resources/BestPriceCalculator.java25
-rw-r--r--game-engine/src/main/java/org/luxons/sevenwonders/game/resources/ResourcePool.java29
2 files changed, 29 insertions, 25 deletions
diff --git a/game-engine/src/main/java/org/luxons/sevenwonders/game/resources/BestPriceCalculator.java b/game-engine/src/main/java/org/luxons/sevenwonders/game/resources/BestPriceCalculator.java
index 8fed41d1..0cae3fe2 100644
--- a/game-engine/src/main/java/org/luxons/sevenwonders/game/resources/BestPriceCalculator.java
+++ b/game-engine/src/main/java/org/luxons/sevenwonders/game/resources/BestPriceCalculator.java
@@ -73,30 +73,5 @@ public class BestPriceCalculator {
return currentMinPrice;
}
- private static class ResourcePool {
-
- private final Set<Set<ResourceType>> choices;
-
- private final Provider provider;
-
- private final TradingRules rules;
-
- private ResourcePool(Production production, Provider provider, TradingRules rules) {
- this.choices = production.asChoices();
- this.provider = provider;
- this.rules = rules;
- }
-
- Set<Set<ResourceType>> getChoices() {
- return choices;
- }
-
- int getCost(ResourceType type) {
- if (provider == null) {
- return 0;
- }
- return rules.getCost(type, provider);
- }
- }
}
diff --git a/game-engine/src/main/java/org/luxons/sevenwonders/game/resources/ResourcePool.java b/game-engine/src/main/java/org/luxons/sevenwonders/game/resources/ResourcePool.java
new file mode 100644
index 00000000..ad368066
--- /dev/null
+++ b/game-engine/src/main/java/org/luxons/sevenwonders/game/resources/ResourcePool.java
@@ -0,0 +1,29 @@
+package org.luxons.sevenwonders.game.resources;
+
+import java.util.Set;
+
+class ResourcePool {
+
+ private final Set<Set<ResourceType>> choices;
+
+ private final Provider provider;
+
+ private final TradingRules rules;
+
+ ResourcePool(Production production, Provider provider, TradingRules rules) {
+ this.choices = production.asChoices();
+ this.provider = provider;
+ this.rules = rules;
+ }
+
+ Set<Set<ResourceType>> getChoices() {
+ return choices;
+ }
+
+ int getCost(ResourceType type) {
+ if (provider == null) {
+ return 0;
+ }
+ return rules.getCost(type, provider);
+ }
+}
bgstack15