• Mahmoud Aglan's avatar
    fix(ludo): PHASE 2 — correct board layout, fix ALL critical bugs · 5fd78414
    Mahmoud Aglan authored
    Board Layout (matches reference image):
    - Color order: Red(TL), Blue(TR), Yellow(BR), Green(BL)
    - Fixed SHARED_PATH: 52 squares going clockwise correctly
    - Fixed START_SQUARES: [0, 13, 26, 39] — NOW MATCHES rules.js
    - Fixed HOME_COLUMNS: correct paths toward center per player
    - Fixed SAFE_SQUARES: match official Ludo star positions
    - Fixed HOME_ENTRY: correct squares before entering home column
    
    Rules Engine fixes:
    - START_POSITIONS now matches board-map START_SQUARES (was off by 1!)
    - Capture logic: only checks pieces on shared path (pos < 52)
    - Home column pieces CANNOT be captured (pos >= BOARD_SIZE check)
    - Three consecutive 6s = piece goes back home, lose turn
    - Exact finish requirement enforced (must land exactly on 58)
    - Extra turn on: rolling 6, capturing, finishing
    - Bot AI priority fixed: finish > capture > enter > advance furthest
    
    Dead code removed:
    - doMove() cleaned up (was return + unreachable code)
    
    Color order fixed in game scene:
    - COLORS array matches rules.js order
    - COLORS_LIGHT matches too
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    5fd78414
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...