Commit ed1fc3ce authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: comprehensive chess multiplayer sync overhaul

- Eliminate double polling: removed game.js own poller, use match-session's
  single 2s poll via handleLivePollData callback (halves network requests)
- Send last_move (from/to/san/promotion) in game_state so opponent gets
  exact move data — fixes castling, en passant, promotion animations
- Opponent moves now animate (piece slides) instead of board snap
- Capture particles now fire on opponent's captures too
- Castling sound+haptic plays for opponent's castles
- Draw flow: sender sees "sent" confirmation, receiver sees accept/deny
  dialog (30s timeout), both sides see result via game_state merge
- Emote dedup: timestamp tracking prevents repeated display on same emote
- Emotes use correct emoji lookup (getEmojiForKey) instead of 3 hardcoded
- Polling runs even during player's turn (emotes + draws must arrive anytime)
- Game end detection covers draw result ('draw' + 'aborted')
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 86b39890
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment