• Mahmoud Aglan's avatar
    fix: live chess — resign syncs, reconnect preserves color, clocks sync · f49fc5cb
    Mahmoud Aglan authored
    Three critical multiplayer sync issues fixed:
    
    1. Resign now notifies server (action:'resign') BEFORE ending locally.
       Opponent's polling detects status:'completed' + result and shows win.
    
    2. Reconnect recovery completely rewritten:
       - Determines player color from match data (white_player_id vs userId)
       - Flips board correctly for black
       - Sets lastKnownMoveCount from server to prevent duplicate move processing
       - Detects if game already ended while disconnected (opponent resigned)
       - Restores canSelect with correct color check
    
    3. sendLiveMove now includes clock times (white_time_remaining_ms,
       black_time_remaining_ms) so opponent sees accurate clocks.
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    f49fc5cb
Name
Last commit
Last update
..
auth Loading commit data...
chess Loading commit data...
domino Loading commit data...
ludo Loading commit data...
org Loading commit data...
play Loading commit data...
profile Loading commit data...
puzzles Loading commit data...
rank Loading commit data...
rewards Loading commit data...
shop Loading commit data...
social Loading commit data...