summaryrefslogtreecommitdiff
path: root/sw-common-model/src/commonMain
diff options
context:
space:
mode:
Diffstat (limited to 'sw-common-model/src/commonMain')
-rw-r--r--sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/score/Score.kt3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/score/Score.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/score/Score.kt
index 9b0c5fb6..36ed1ca2 100644
--- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/score/Score.kt
+++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/score/Score.kt
@@ -8,9 +8,8 @@ data class ScoreBoard(val scores: List<PlayerScore>) {
require(scores.sortedDescending() == scores) { "Scores must be sorted highest-to-lowest" }
}
- @OptIn(ExperimentalStdlibApi::class)
val ranks: List<Int>
- get() = buildList<Int> {
+ get() = buildList {
add(1)
scores.zipWithNext { prev, current -> current.compareTo(prev) == 0 }.forEach { exAequoWithPrev ->
add(if (exAequoWithPrev) last() else size + 1)
bgstack15