Fix bug in missed rounds computation
This commit is contained in:
@@ -92,7 +92,7 @@ abstract class BasePairingHelper(
|
||||
val Pairable.sodos: Double get() = historyHelper.sodos[id] ?: 0.0
|
||||
val Pairable.cums: Double get() = historyHelper.cumScore[id] ?: 0.0
|
||||
fun Pairable.missedRounds(upToRound: Int, pairing: Set<ID>): Int = (1..upToRound).map { round ->
|
||||
if (historyHelper.playersPerRound.getOrNull(round - 1)?.contains(id) == true || pairing.contains(id)) 0 else 1
|
||||
if (historyHelper.playersPerRound.getOrNull(round - 1)?.contains(id) == true || round == upToRound && pairing.contains(id)) 0 else 1
|
||||
}.sum()
|
||||
fun Pairable.eval(criterion: Criterion) = evalCriterion(this, criterion)
|
||||
open fun evalCriterion(pairable: Pairable, criterion: Criterion) = when (criterion) {
|
||||
|
@@ -19,6 +19,8 @@ object EGFRatingsHandler: RatingsHandler(RatingsManager.Ratings.EGF) {
|
||||
}.toTypedArray()
|
||||
Json.MutableObject(*pairs).also {
|
||||
it["origin"] = "EGF"
|
||||
// override rank with rating equivalent
|
||||
val rating = it["rating"]?.toString()?.toIntOrNull()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -10,8 +10,6 @@
|
||||
</div>
|
||||
<div class="tournaments section">
|
||||
#set($files = $api.get('tour'))
|
||||
$log.info("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
|
||||
$log.info($files)
|
||||
#if($files.containsKey('error'))
|
||||
#set($error = $files.error)
|
||||
#elseif($files.containsKey('message'))
|
||||
|
Reference in New Issue
Block a user