From 576be99952e44782b717cae21b3cafcc8557277a Mon Sep 17 00:00:00 2001 From: Claude Brisson Date: Sat, 29 Nov 2025 13:36:32 +0100 Subject: [PATCH] FFG export: treat zero byoyomi/increment as sudden death When byoyomi=0 (Japanese/Canadian) or increment=0 (Fischer), display "Sudden death" instead of absurd "3 periods of 0 minutes" --- .../kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt index ad1a757..ae19088 100644 --- a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt +++ b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt @@ -187,9 +187,12 @@ ${ ; Generated by Pairgoth $version ; ${ when (tournament.timeSystem.type) { - CANADIAN -> "Canadian ${tournament.timeSystem.mainTime / 60} minutes, ${tournament.timeSystem.stones} stones / ${tournament.timeSystem.byoyomi / 60} minutes" - JAPANESE -> "Japanese ${tournament.timeSystem.mainTime / 60} minutes, ${tournament.timeSystem.periods} periods of ${tournament.timeSystem.byoyomi / 60} minutes" - FISCHER -> "Fisher ${tournament.timeSystem.mainTime / 60} minutes + ${tournament.timeSystem.increment} seconds${ if (tournament.timeSystem.maxTime > 0) ", max ${tournament.timeSystem.maxTime / 60} minutes" else "" }" + CANADIAN -> if (tournament.timeSystem.byoyomi > 0) "Canadian ${tournament.timeSystem.mainTime / 60} minutes, ${tournament.timeSystem.stones} stones / ${tournament.timeSystem.byoyomi / 60} minutes" + else "Sudden death ${tournament.timeSystem.mainTime / 60} minutes" + JAPANESE -> if (tournament.timeSystem.byoyomi > 0) "Japanese ${tournament.timeSystem.mainTime / 60} minutes, ${tournament.timeSystem.periods} periods of ${tournament.timeSystem.byoyomi / 60} minutes" + else "Sudden death ${tournament.timeSystem.mainTime / 60} minutes" + FISCHER -> if (tournament.timeSystem.increment > 0) "Fisher ${tournament.timeSystem.mainTime / 60} minutes + ${tournament.timeSystem.increment} seconds${ if (tournament.timeSystem.maxTime > 0) ", max ${tournament.timeSystem.maxTime / 60} minutes" else "" }" + else "Sudden death ${tournament.timeSystem.mainTime / 60} minutes" SUDDEN_DEATH -> "Sudden death ${tournament.timeSystem.mainTime / 60} minutes" } }