Add a game between ByePlayer and the player chosen to bye (constructed as a win)

This commit is contained in:
Quentin Rendu
2023-12-07 15:12:04 +01:00
parent eea9daafce
commit 707eae15b3

View File

@@ -119,8 +119,9 @@ sealed class BaseSolver(
if (chosenByePlayer != ByePlayer) sorted.add(listOf(chosenByePlayer, ByePlayer)) if (chosenByePlayer != ByePlayer) sorted.add(listOf(chosenByePlayer, ByePlayer))
println(sorted.size)*/ println(sorted.size)*/
val result = sorted.flatMap { games(white = it[0], black = it[1]) } var result = sorted.flatMap { games(white = it[0], black = it[1]) }
// add game for ByePlayer
if (chosenByePlayer != ByePlayer) result += Game(id = Store.nextGameId, white = ByePlayer.id, black = chosenByePlayer.id, result = Game.Result.fromSymbol('b'))
if (DEBUG_EXPORT_WEIGHT) { if (DEBUG_EXPORT_WEIGHT) {
var sumOfWeights = 0.0 var sumOfWeights = 0.0