• Mahmoud Aglan's avatar
    fix(ludo): prevent pawns on safe squares from being sent home · 31cf6666
    Mahmoud Aglan authored
    Two bugs caused pawns to teleport back to the yard without capture:
    
    1. Triple-six penalty blindly sent the last-moved piece to pos=-1
       regardless of whether it was resting on a safe square. Now the
       penalty only applies if the piece is NOT on a safe square.
    
    2. captureAt() checked if the DESTINATION was safe but didn't guard
       against the victim's own position being safe. Added a per-piece
       safety check so a pawn sitting on any safe square (star squares,
       colored start squares) can never be captured under any circumstance.
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    31cf6666
Name
Last commit
Last update
..
auth Loading commit data...
chess Loading commit data...
domino Loading commit data...
ludo Loading commit data...
org Loading commit data...
play Loading commit data...
profile Loading commit data...
puzzles Loading commit data...
rank Loading commit data...
rewards Loading commit data...
shop Loading commit data...
social Loading commit data...
tournaments Loading commit data...