Fix basic tests

This commit is contained in:
Claude Brisson
2024-05-29 13:36:58 +02:00
parent c6a898f8dc
commit d26f0ea010

View File

@@ -76,7 +76,6 @@ sealed class Tournament <P: Pairable>(
fun recomputeDUDD(round: Int, gameID: ID) { fun recomputeDUDD(round: Int, gameID: ID) {
// Instantiate solver with game history // Instantiate solver with game history
val history = historyBefore(round)
val solver = pairing.solver(this, round, pairables.values.toList()) val solver = pairing.solver(this, round, pairables.values.toList())
// Recomputes DUDD and hd // Recomputes DUDD and hd
@@ -92,8 +91,8 @@ sealed class Tournament <P: Pairable>(
* Recompute DUDD for the specified round * Recompute DUDD for the specified round
*/ */
fun recomputeDUDD(round: Int) { fun recomputeDUDD(round: Int) {
if (pairables.isEmpty() || games(1).isEmpty()) return;
// Instantiate solver with game history // Instantiate solver with game history
val history = historyBefore(round)
val solver = pairing.solver(this, round, pairables.values.toList()) val solver = pairing.solver(this, round, pairables.values.toList())
for (game in games(round).values) { for (game in games(round).values) {
val white = solver.pairables.find { p-> p.id == game.white }!! val white = solver.pairables.find { p-> p.id == game.white }!!