• Mahmoud Aglan's avatar
    feat: Ludo multiplayer — 2 humans + 2 bots, matchmaking + realtime sync · d6b1ca39
    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: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    d6b1ca39
Name
Last commit
Last update
..
assets/brand Loading commit data...
css Loading commit data...
icons Loading commit data...
js Loading commit data...
uploads/theme Loading commit data...