From 0f9afbcc656efe38ec54d33920b0746a54261d73 Mon Sep 17 00:00:00 2001 From: Claude Brisson Date: Wed, 31 Jan 2024 06:01:04 +0100 Subject: [PATCH] Fix tables number export bug --- .../src/main/kotlin/org/jeudego/pairgoth/ext/OpenGotha.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/ext/OpenGotha.kt b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/ext/OpenGotha.kt index bf597d1..4719356 100644 --- a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/ext/OpenGotha.kt +++ b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/ext/OpenGotha.kt @@ -242,11 +242,11 @@ object OpenGotha { // TODO - table number is not any more kinda random like this ${(1..tournament.lastRound()).map { tournament.games(it) }.flatMapIndexed { index, games -> - games.values.mapIndexedNotNull { table, game -> + games.values.mapNotNull { game -> if (game.black == 0 || game.white == 0) null - else Triple(index + 1, table , game) + else Pair(index + 1, game) } - }.joinToString("\n") { (round, table, game) -> + }.joinToString("\n") { (round, game) -> """