Commit 3b54be30 authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: triple-six penalty only ends turn, pawn stays in place

Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 1aa5577b
......@@ -219,14 +219,7 @@ export function applyMove(game, playerIdx, move) {
game.extraTurn = true;
player.consecutiveSixes = (player.consecutiveSixes || 0) + 1;
if (player.consecutiveSixes >= 3) {
// Triple-six penalty: send piece home ONLY if it's NOT resting on a safe square
const penaltyGlobal = piece.pos >= 0 && piece.pos <= HOME_ENTRY_POS
? (piece.pos + START_POSITIONS[playerIdx]) % SHARED_PATH_LENGTH
: -1;
if (penaltyGlobal === -1 || !SAFE_SQUARES.includes(penaltyGlobal)) {
piece.pos = -1;
piece.finished = false;
}
// Triple-six penalty: lose extra turn only, pawn stays in place
player.consecutiveSixes = 0;
game.extraTurn = false;
}
......
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