• 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
..
achievements.php Loading commit data...
activity.php Loading commit data...
analysis.php Loading commit data...
auth.php Loading commit data...
battlepass.php Loading commit data...
bots.php Loading commit data...
challenges.php Loading commit data...
config.php Loading commit data...
daily-reward.php Loading commit data...
domino.php Loading commit data...
friends.php Loading commit data...
game.php Loading commit data...
leaderboard.php Loading commit data...
ludo-match.php Loading commit data...
ludo.php Loading commit data...
matchmaking.php Loading commit data...
multiplayer.php Loading commit data...
notifications.php Loading commit data...
orgs.php Loading commit data...
profile.php Loading commit data...
puzzles.php Loading commit data...
ratings.php Loading commit data...
shop.php Loading commit data...
swiss.php Loading commit data...
theme.php Loading commit data...
tournaments.php Loading commit data...