diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2017-05-10 07:39:03 +0200 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2017-05-10 07:39:03 +0200 |
commit | 0ca787b3315e8074483895b428aaa1c84c3dc512 (patch) | |
tree | c6ccb778d045eb937a1e2d63c04ad4f15ce57840 /backend/src/test/java | |
parent | Refac requirement-checking methods (diff) | |
download | seven-wonders-0ca787b3315e8074483895b428aaa1c84c3dc512.tar.gz seven-wonders-0ca787b3315e8074483895b428aaa1c84c3dc512.tar.bz2 seven-wonders-0ca787b3315e8074483895b428aaa1c84c3dc512.zip |
Make BestPriceCalculator use the public production of the neighbours
It was incorrectly using the private production.
Diffstat (limited to 'backend/src/test/java')
-rw-r--r-- | backend/src/test/java/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
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)); |