Code review

This commit is contained in:
Claude Brisson
2025-05-16 22:30:05 +02:00
parent 21f9741a8b
commit 67e0697b6b

View File

@@ -74,14 +74,14 @@ abstract class BasePairingHelper(
}.toMap()
}
// number of players in the biggest club and the biggest country
// this can be used to disable geocost if there is a majority of players from the same country or club
protected val biggestClubSize by lazy {
pairables.groupingBy { it.club }.eachCount().values.maxOrNull()!!
}
protected val biggestCountrySize by lazy {
pairables.groupingBy { it.club }.eachCount().values.maxOrNull()!!
}
// number of players in the biggest club and the biggest country
// this can be used to disable geocost if there is a majority of players from the same country or club
protected val biggestClubSize by lazy {
pairables.groupingBy { it.club }.eachCount().values.maxOrNull()!!
}
protected val biggestCountrySize by lazy {
pairables.groupingBy { it.club }.eachCount().values.maxOrNull()!!
}
// already paired players map
protected fun Pairable.played(other: Pairable) = historyHelper.playedTogether(this, other)