No systematic renumbering!
This commit is contained in:
@@ -60,9 +60,6 @@ object PairingHandler: PairgothApiHandler {
|
||||
}
|
||||
val games = tournament.pair(round, pairables)
|
||||
|
||||
// always renumber table to take table exclusion into account
|
||||
tournament.renumberTables(round)
|
||||
|
||||
val ret = games.map { it.toJson() }.toJsonArray()
|
||||
tournament.dispatchEvent(GamesAdded, request, Json.Object("round" to round, "games" to ret))
|
||||
return ret
|
||||
|
@@ -114,11 +114,17 @@ sealed class Tournament <P: Pairable>(
|
||||
}
|
||||
}
|
||||
|
||||
fun usedTables(round: Int): BitSet =
|
||||
games(round).values.map { it.table }.fold(BitSet()) { acc, table ->
|
||||
fun usedTables(round: Int): BitSet {
|
||||
val assigned = games(round).values.map { it.table }.fold(BitSet()) { acc, table ->
|
||||
acc.set(table)
|
||||
acc
|
||||
}
|
||||
val excluded = excludedTables(round)
|
||||
for (table in excluded) {
|
||||
assigned.set(table)
|
||||
}
|
||||
return assigned
|
||||
}
|
||||
|
||||
private fun defaultGameOrderBy(game: Game): Int {
|
||||
val whiteRank = pairables[game.white]?.rating ?: Int.MIN_VALUE
|
||||
|
Reference in New Issue
Block a user