From 6640170c01ccf5c7de8c0893379c1b500f9e9fb1 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sun, 3 Jul 2022 00:18:46 +0200 Subject: Upgrade to Kotlin 1.7 --- .../src/commonMain/kotlin/org/luxons/sevenwonders/model/score/Score.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sw-common-model') 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) { require(scores.sortedDescending() == scores) { "Scores must be sorted highest-to-lowest" } } - @OptIn(ExperimentalStdlibApi::class) val ranks: List - get() = buildList { + get() = buildList { add(1) scores.zipWithNext { prev, current -> current.compareTo(prev) == 0 }.forEach { exAequoWithPrev -> add(if (exAequoWithPrev) last() else size + 1) -- cgit