Skip to content

Fix 3check 960 mode missing check counter - #322

Merged
QueensGambit merged 1 commit into
ml-research:masterfrom
jay23606:pr-go/177-3check-doesn-t-work-for-960-mode
Nov 20, 2026
Merged

QueensGambit merged 1 commit into
ml-research:masterfrom
jay23606:pr-go/177-3check-doesn-t-work-for-960-mode

Conversation

@jay23606

Copy link
Copy Markdown
Contributor

Bug

In 960 mode, the starting FEN built by Mode960.vue always ends with - 0 1. For the 3check variant this omits the remaining-checks counter, so the engine assumes 1-check and the game ends at the first check instead of the third.

Change

c960_fen in src/renderer/components/Mode960.vue now writes 3+3 in the checks field when the variant is 3check. Other variants are unchanged.

Testing

Added tests/mode960.test.js, which loads the component's methods and checks the generated FEN. After the fix:

  • node --test tests/mode960.test.js: exit 0, ℹ fail 0

The repository has no test runner and its CI only runs lint, which was not run here because node_modules is not installed in this clone.

Regression test: CONTRIBUTING does not mention tests

Fixes #177

@QueensGambit

Copy link
Copy Markdown
Collaborator

Thank you for the fix and the added test case!

@QueensGambit
QueensGambit merged commit 7a261f3 into ml-research:master Nov 20, 2026
1 check passed
@jay23606
jay23606 deleted the pr-go/177-3check-doesn-t-work-for-960-mode branch November 20, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3check doesn't work for 960 mode

2 participants