Skip to content

Commit 87cd68c

Browse files
author
Matt Tucker
committed
Fix tuzdik creation bug to ensure tuzdiks only created on opponents side
1 parent dcf6fe2 commit 87cd68c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/util.ts

+1
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ export function togyzkumalakUpdatePiecesFromMove(
521521
destBoardIndex !== boardWidth - 1 &&
522522
destBoardIndex !== boardWidth * 2 - 1 &&
523523
finalBoardArray[destBoardIndex] === 3 &&
524+
dest[1] !== orig[1] &&
524525
(existingTuzdik.length === 0 ||
525526
(existingTuzdik.length === 1 &&
526527
existingTuzdik[0] % boardWidth !== destBoardIndex % boardWidth &&

0 commit comments

Comments
 (0)