Fix swiss scores

This commit is contained in:
Claude Brisson
2024-09-04 20:39:36 +02:00
parent 3c32e717e2
commit 12ae4b0083

View File

@@ -17,8 +17,9 @@ class SwissSolver(round: Int,
// In a Swiss tournament the main criterion is the number of wins and already computed
override val scores by lazy {
historyHelper.wins.mapValues {
Pair(0.0, it.value) }
pairablesMap.mapValues {
Pair(0.0, historyHelper.wins[it.value.id] ?: 0.0)
}
}
override val scoresX: Map<ID, Double> get() = scores.mapValues { it.value.second }