Commit 1f8615ee authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: use browser-measured slot positions for Ludo base pieces

Measured actual slot center coordinates from the rendered DOM instead
of calculating from CSS math. Fixes piece-to-slot misalignment.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 9c4abe65
......@@ -106,29 +106,29 @@ var LudoConstants = (function() {
404: [9, 7],
405: [8, 7],
// P1 Base positions (bottom-left quadrant, cols 0-5, rows 9-14)
500: [1.64, 10.64],
501: [3.36, 10.64],
502: [1.64, 12.36],
503: [3.36, 12.36],
// P2 Base positions (top-left quadrant, cols 0-5, rows 0-5)
600: [1.64, 1.64],
601: [3.36, 1.64],
602: [1.64, 3.36],
603: [3.36, 3.36],
// P3 Base positions (top-right quadrant, cols 9-14, rows 0-5)
700: [10.64, 1.64],
701: [12.36, 1.64],
702: [10.64, 3.36],
703: [12.36, 3.36],
// P4 Base positions (bottom-right quadrant, cols 9-14, rows 9-14)
800: [10.64, 10.64],
801: [12.36, 10.64],
802: [10.64, 12.36],
803: [12.36, 12.36]
// P1 Base positions (measured from browser)
500: [1.83, 10.84],
501: [3.18, 10.84],
502: [1.83, 12.18],
503: [3.18, 12.18],
// P2 Base positions (measured from browser)
600: [1.83, 1.83],
601: [3.18, 1.83],
602: [1.83, 3.18],
603: [3.18, 3.18],
// P3 Base positions (measured from browser)
700: [10.84, 1.83],
701: [12.18, 1.83],
702: [10.84, 3.18],
703: [12.18, 3.18],
// P4 Base positions (measured from browser)
800: [10.84, 10.84],
801: [12.18, 10.84],
802: [10.84, 12.18],
803: [12.18, 12.18]
};
var BASE_POSITIONS = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment