diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/luxons/sevenwonders/game/boards/Science.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/luxons/sevenwonders/game/boards/Science.java b/src/main/java/org/luxons/sevenwonders/game/boards/Science.java index 71687657..5be8e23e 100644 --- a/src/main/java/org/luxons/sevenwonders/game/boards/Science.java +++ b/src/main/java/org/luxons/sevenwonders/game/boards/Science.java @@ -36,7 +36,11 @@ public class Science { } public int computePoints() { - Integer[] values = quantities.values().toArray(new Integer[quantities.size()]); + ScienceType[] types = ScienceType.values(); + Integer[] values = new Integer[types.length]; + for (int i = 0; i < types.length; i++) { + values[i] = quantities.getOrDefault(types[i], 0); + } return computePoints(values, jokers); } |