• 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
.claude Loading commit data...
Connections and docs Loading commit data...
admin Loading commit data...
api Loading commit data...
config Loading commit data...
docs Loading commit data...
includes Loading commit data...
public Loading commit data...
screenshots Loading commit data...
.gitignore Loading commit data...
.htaccess Loading commit data...
ARCHITECTURE.md Loading commit data...
ASSET_REGISTRY.json Loading commit data...
ASSET_REGISTRY.md Loading commit data...
BUILD_ORDER.md Loading commit data...
DATABASE_REFERENCE.md Loading commit data...
DESIGN.md Loading commit data...
Dockerfile Loading commit data...
PLAN.md Loading commit data...
Stockfishbotsapi.txt Loading commit data...
captain-definition Loading commit data...
index.php Loading commit data...