Correct formula for bye player in Swiss system

This commit is contained in:
Quentin Rendu
2024-11-25 11:27:04 +09:00
committed by Claude Brisson
parent 09250265c8
commit b66b577077
2 changed files with 6 additions and 1 deletions

View File

@@ -55,7 +55,8 @@ sealed class BaseSolver(
pairing.handicap.color(p1, p2)
open fun computeWeightForBye(p: Pairable): Double{
return p.rank + 2*(p.main+p.rank)
// The weightForBye function depends on the system type (Mac-Mahon or Swiss), default value is 0.0
return 0.0
}
fun pair(): List<Game> {

View File

@@ -24,4 +24,8 @@ class SwissSolver(round: Int,
override val scoresX: Map<ID, Double> get() = scores.mapValues { it.value.second }
override val mainLimits = Pair(0.0, round - 1.0)
override fun computeWeightForBye(p: Pairable): Double{
return p.rank + 40*p.main
}
}