# Task ID: 18
# Title: Disconnect & Reconnect Mechanism (Client & Server)
# Status: pending
# Dependencies: 9, 10, 13
# Priority: high
# Description: Implement a robust mechanism for handling client disconnections during a game, allowing players to automatically reconnect and resume their game session.
# Details:
Frontend: Implement exponential backoff for WebSocket reconnection attempts (1s, 2s, 4s...). Display a 'Reconnecting...' UI. Backend: Store a snapshot of the current game state in Redis. When a client reconnects, verify their identity and send the latest game state snapshot. Implement a 30-minute room retention policy for disconnected players to rejoin.

# Test Strategy:
During a live game, forcibly disconnect the client (e.g., turn off Wi-Fi, close and reopen app quickly). Verify automatic reconnection and game state restoration. Test behavior when reconnection fails after multiple attempts (return to lobby). Test if the room persists for 30 mins.
