fix reversed A/C chair mapping and update hot/cold on round end

CHAIRS mapping was {1:A, 2:B, 3:C} but the API's country field has
1=C and 3=A. Fixed the mapping in backend and both frontends, added a
startup migration to swap A↔C columns in existing DB data, corrected
multiIf SQL queries that hardcoded the wrong winner→column mapping,
and moved _save_round() to the ENDED status block so hot/cold stats
reflect the latest round immediately.
This commit is contained in:
2026-02-25 20:49:16 +05:00
parent 3016f33783
commit e65b6b2cfb
6 changed files with 39 additions and 6 deletions

View File

@@ -33,7 +33,7 @@ VALUES = {1: "A", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7",
8: "8", 9: "9", 10: "10", 11: "J", 12: "Q", 13: "K", 14: "A"}
HAND_TYPES = {1: "High Card", 2: "Pair", 3: "Flush", 4: "Straight",
5: "Straight Flush", 6: "Trail"}
CHAIRS = {1: "A", 2: "B", 3: "C"}
CHAIRS = {1: "C", 2: "B", 3: "A"}
STATUS_NAMES = {0: "NEW", 1: "BETTING", 2: "REVEALING", 3: "ENDED"}
# Environment