Correct formula for bye player in Swiss system
This commit is contained in:

committed by
Claude Brisson

parent
09250265c8
commit
b66b577077
@@ -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> {
|
||||
|
@@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user