summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/src/main/java/org/luxons/sevenwonders/game/resources/BestPriceCalculator.java2
-rw-r--r--backend/src/test/java/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.java5
2 files changed, 4 insertions, 3 deletions
diff --git a/backend/src/main/java/org/luxons/sevenwonders/game/resources/BestPriceCalculator.java b/backend/src/main/java/org/luxons/sevenwonders/game/resources/BestPriceCalculator.java
index df51fe4c..8fed41d1 100644
--- a/backend/src/main/java/org/luxons/sevenwonders/game/resources/BestPriceCalculator.java
+++ b/backend/src/main/java/org/luxons/sevenwonders/game/resources/BestPriceCalculator.java
@@ -29,7 +29,7 @@ public class BestPriceCalculator {
for (Provider provider : providers) {
Board providerBoard = table.getBoard(playerIndex, provider.getBoardPosition());
- ResourcePool pool = new ResourcePool(providerBoard.getProduction(), provider, rules);
+ ResourcePool pool = new ResourcePool(providerBoard.getPublicProduction(), provider, rules);
pools.add(pool);
}
return pools;
diff --git a/backend/src/test/java/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.java b/backend/src/test/java/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.java
index ad1641c5..3706745d 100644
--- a/backend/src/test/java/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.java
+++ b/backend/src/test/java/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.java
@@ -42,7 +42,6 @@ public class BestPriceCalculatorTest {
Board opposite = TestUtils.createBoard(ResourceType.GLASS);
Table table = new Table(Arrays.asList(main, right, opposite, left));
-
Resources resources = new Resources();
resources.add(ResourceType.WOOD, 1);
assertEquals(1, BestPriceCalculator.bestPrice(resources, table, 0));
@@ -60,10 +59,10 @@ public class BestPriceCalculatorTest {
Board right = TestUtils.createBoard(ResourceType.ORE);
right.getProduction().addChoice(ResourceType.WOOD, ResourceType.CLAY);
+ right.getPublicProduction().addChoice(ResourceType.WOOD, ResourceType.CLAY);
Table table = new Table(Arrays.asList(main, right, left));
-
Resources resources = new Resources();
resources.add(ResourceType.WOOD, 1);
assertEquals(1, BestPriceCalculator.bestPrice(resources, table, 0));
@@ -82,6 +81,8 @@ public class BestPriceCalculatorTest {
Board right = TestUtils.createBoard(ResourceType.WOOD);
right.getProduction().addFixedResource(ResourceType.ORE, 1);
right.getProduction().addFixedResource(ResourceType.CLAY, 1);
+ right.getPublicProduction().addFixedResource(ResourceType.ORE, 1);
+ right.getPublicProduction().addFixedResource(ResourceType.CLAY, 1);
Table table = new Table(Arrays.asList(main, right, left));
bgstack15