Skip to content

Commit

Permalink
Accept alternate Mate-in-1 in puzzle mode (#388)
Browse files Browse the repository at this point in the history
fixes #383
  • Loading branch information
Nullsp4ce authored Sep 15, 2024
1 parent e4ed430 commit 7ed016b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/puzzles/PuzzleBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function PuzzleBoard({
const uci = makeUci(move);
newPos.play(move);

if (puzzle.moves[currentMove] === uci) {
if (puzzle.moves[currentMove] === uci || newPos.isCheckmate()) {
if (currentMove === puzzle.moves.length - 1) {
if (puzzle.completion !== "incorrect") {
changeCompletion("correct");
Expand Down

0 comments on commit 7ed016b

Please sign in to comment.