From e23a0f7f850a695043075f041ab6edeaec75ac51 Mon Sep 17 00:00:00 2001 From: jbock Date: Wed, 7 Aug 2024 15:54:07 +0200 Subject: [PATCH] fix counting --- src/main/client/src/store.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/client/src/store.js b/src/main/client/src/store.js index f41cda5..86a95d3 100644 --- a/src/main/client/src/store.js +++ b/src/main/client/src/store.js @@ -174,6 +174,9 @@ export const useGameStore = create((set, get) => ({ })) function createMoveData(baseBoard, moves, move) { + if (move.pass && moves.length && moves[moves.length - 1].pass) { + return [move, count(baseBoard), [-1, -1]] + } if (move.counting) { let updated = move.resetCounting ? resetCounting(baseBoard) :