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:
@@ -333,7 +333,7 @@ const escHtml = s => {
|
||||
return d.innerHTML;
|
||||
};
|
||||
|
||||
const CHAIRS = {1:'A', 2:'B', 3:'C'};
|
||||
const CHAIRS = {1:'C', 2:'B', 3:'A'};
|
||||
const CHAIR_COLORS = {A:'#3b82f6', B:'#ec4899', C:'#f59e0b'};
|
||||
const HAND_TYPES = {1:'High Card', 2:'Pair', 3:'Flush', 4:'Straight', 5:'Str. Flush', 6:'Trail'};
|
||||
|
||||
|
||||
@@ -775,7 +775,7 @@ const fmtFull = n => {
|
||||
return Number(n).toLocaleString();
|
||||
};
|
||||
|
||||
const CHAIRS = {1:'A', 2:'B', 3:'C'};
|
||||
const CHAIRS = {1:'C', 2:'B', 3:'A'};
|
||||
const CHAIR_COLORS = {A:'#3b82f6', B:'#ec4899', C:'#f59e0b'};
|
||||
const HAND_TYPES = {1:'High Card', 2:'Pair', 3:'Flush', 4:'Straight', 5:'Str. Flush', 6:'Trail'};
|
||||
const HAND_RANK = {1:1, 2:2, 3:3, 4:4, 5:5, 6:6};
|
||||
|
||||
Reference in New Issue
Block a user