summaryrefslogtreecommitdiff
path: root/sw-engine/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'sw-engine/src/main')
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Science.kt2
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Hands.kt2
2 files changed, 2 insertions, 2 deletions
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Science.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Science.kt
index 992f4079..681f1c27 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Science.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Science.kt
@@ -50,7 +50,7 @@ internal class Science {
private fun computePointsNoJoker(values: List<Int>): Int {
val independentSquaresSum = values.sumBy { it * it }
- val nbGroupsOfAll = values.min() ?: 0
+ val nbGroupsOfAll = values.minOrNull() ?: 0
return independentSquaresSum + nbGroupsOfAll * 7
}
}
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Hands.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Hands.kt
index b024848d..9bb1e6f8 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Hands.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Hands.kt
@@ -35,5 +35,5 @@ internal class Hands(private val hands: List<List<Card>>) {
return Hands(newHands)
}
- fun maxOneCardRemains(): Boolean = hands.map { it.size }.max() ?: 0 <= 1
+ fun maxOneCardRemains(): Boolean = hands.map { it.size }.maxOrNull() ?: 0 <= 1
}
bgstack15