Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
el3ab-Player
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
el3ab-Player
Commits
3b54be30
Commit
3b54be30
authored
Jun 17, 2026
by
Mahmoud Aglan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: triple-six penalty only ends turn, pawn stays in place
Co-Authored-By:
Claude Opus 4.6
<
noreply@anthropic.com
>
parent
1aa5577b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
rules.js
public/js/modules/ludo/logic/rules.js
+1
-8
No files found.
public/js/modules/ludo/logic/rules.js
View file @
3b54be30
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment