Pairing still in progress

This commit is contained in:
Claude Brisson
2023-12-21 13:08:59 +01:00
parent ea9e298330
commit b0a095fed0
5 changed files with 19 additions and 6 deletions

View File

@@ -20,7 +20,7 @@ object PairingHandler: PairgothApiHandler {
val playing = tournament.games(round).values.flatMap {
listOf(it.black, it.white)
}.toSet()
return tournament.pairables.values.filter { !it.skip.contains(round) && !playing.contains(it.id) }.map { it.id }.toJsonArray()
return tournament.pairables.values.filter { !it.skip.contains(round) && !playing.contains(it.id) }.sortedByDescending { it.rating }.map { it.id }.toJsonArray()
}
override fun post(request: HttpServletRequest): Json {