Skip to content

Commit

Permalink
fix: prevent moves after puzzle completion (#406)
Browse files Browse the repository at this point in the history
Fixes #384
  • Loading branch information
dotneB authored Oct 10, 2024
1 parent 5dad5e4 commit 0c2725e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/puzzles/PuzzleBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ function PuzzleBoard({
movable={{
free: false,
color:
puzzle && equal(position, Array(currentMove).fill(0))
puzzle &&
equal(position, Array(currentMove).fill(0)) &&
puzzle.completion === "incomplete"
? turn
: undefined,
dests: dests,
Expand Down

0 comments on commit 0c2725e

Please sign in to comment.