-
Mahmoud Aglan authored
New API: /api/ludo-match.php - queue: searches ludo_queue for opponent, creates match with 2 humans + 2 bots - status: polls for match_id when opponent joins - move: syncs game state (positions, turn, dice) - get: fetches current match state Ludo game scene updated: - Stores mode, myPlayerIndex, matchId, isHost - isMyTurn() checks player_index vs current_turn - handleNonPlayerTurn(): routes to bot (if host) or polling (if waiting) - syncLudoState(): sends positions/turn/dice to server after every move - startLudoPolling(): polls every 2s for opponent moves, applies state - Bot turns run by host only (prevents duplicate bot moves) - Player names show 'أنت' for self, 'لاعب X' for other human, 'Bot X' for bots Queue scene updated: - Uses ludo-match.php endpoint for Ludo games - Passes playerIndex and players array to game scene Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
d6b1ca39