Correct groupsCount computation (1 group if score difference is 0)

This commit is contained in:
Quentin Rendu
2023-10-01 11:21:22 +02:00
parent 3d2d1ccc64
commit ec9c9f1e1b
2 changed files with 993 additions and 993 deletions

View File

@@ -414,7 +414,7 @@ sealed class Solver(
//private val standingScore by lazy { computeStandingScore() } //private val standingScore by lazy { computeStandingScore() }
// Decide each pairable group based on the main criterion // Decide each pairable group based on the main criterion
private val groupsCount get() = (mainLimits.second - mainLimits.first).toInt() private val groupsCount get() = 1 + (mainLimits.second - mainLimits.first).toInt()
private val _groups by lazy { private val _groups by lazy {
pairables.associate { pairable -> Pair(pairable.id, pairable.main.toInt()) } pairables.associate { pairable -> Pair(pairable.id, pairable.main.toInt()) }
} }

File diff suppressed because it is too large Load Diff