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:
@@ -152,6 +152,8 @@ class GamePoller:
|
||||
start_ts = self.round_data.get("time_start_ts", 0)
|
||||
self.round_data["duration_s"] = round(time.time() - start_ts)
|
||||
|
||||
self._save_round()
|
||||
|
||||
await self.broadcast("round_result", {
|
||||
"game_no": gn,
|
||||
"winner": gi.get("gameResult"),
|
||||
|
||||
Reference in New Issue
Block a user