Always display MMS when choosing SCOREX placement criterium

This commit is contained in:
Claude Brisson
2024-08-19 12:50:03 +02:00
parent b039a549e3
commit 7232e69de7
3 changed files with 12 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ fun Tournament<*>.getSortedPairables(round: Int, includePreliminary: Boolean = f
else ceil(score - epsilon)
}
// CB TODO - factorize history helper creation between here and solver classes
val historyHelper = HistoryHelper(historyBefore(round + 1)) {
if (pairing.type == PairingType.SWISS) wins.mapValues { Pair(0.0, it.value) }
else pairables.mapValues {

View File

@@ -92,6 +92,9 @@ object StandingsHandler: PairgothApiHandler {
response.contentType = "text/plain;charset=${encoding}"
val neededCriteria = ArrayList(tournament.pairing.placementParams.criteria)
if (!neededCriteria.contains(NBW)) neededCriteria.add(NBW)
if (neededCriteria.first() == SCOREX) {
neededCriteria.add(1, MMS)
}
exportToEGFFormat(tournament, sortedPairables, neededCriteria, writer)
writer.flush()
return null