From 35977ecdb3cdee92c1b87ed5f4cb710877a1fd61 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 30 Nov 2026 09:58:09 +0100 Subject: [PATCH] WinUI: "highest first" sorts stakes exactly The key 1e15 + bb cannot separate NL2 and NL5: doubles near 1e15 are 0.125 apart, so cash stakes stayed unordered. Use a (cash, height) tuple instead; order is unchanged otherwise (cash by big blind, then tournaments by buy-in). Co-Authored-By: Claude Opus 5.5 --- winui/Seiten/StufenPrio.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/winui/Seiten/StufenPrio.cs b/winui/Seiten/StufenPrio.cs index 23f876f6..1f781f16 100644 --- a/winui/Seiten/StufenPrio.cs +++ b/winui/Seiten/StufenPrio.cs @@ -40,8 +40,9 @@ public sealed class StufenPrio : UserControl _prio, _weitereKopf, _weitere); } - /// Ordnung "Höchste zuerst": Cash nach Big Blind, danach Turniere nach Buy-in (Schluessel -1 Freeroll bis -4). - public static double Wert(double b) => b > 0 ? 1e15 + b : -b; + /// Ordnung "Höchste zuerst": Cash nach Big Blind, danach Turniere nach Buy-in (Schluessel -1 Freeroll bis -4). + /// Ein Tupel statt einer Zahl: 1e15 + bb trennte NL2 und NL5 nicht (Abstand der Doubles bei 1e15 ist 0,125). + public static (bool Cash, double Hoehe) Wert(double b) => (b > 0, b > 0 ? b : -b); private static double Bb(JsonObject st) => st.Zahl("bb") ?? 0;