Repository navigation
Fix 3check 960 mode missing check counter - #322
Merged
QueensGambit merged 1 commit intoNov 20, 2026
Merged
QueensGambit merged 1 commit into
QueensGambit merged 1 commit into
Conversation
Collaborator
|
Thank you for the fix and the added test case! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
In 960 mode, the starting FEN built by
Mode960.vuealways 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_feninsrc/renderer/components/Mode960.vuenow writes3+3in the checks field when the variant is3check. 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 0The repository has no test runner and its CI only runs lint, which was not run here because
node_modulesis not installed in this clone.Regression test: CONTRIBUTING does not mention tests
Fixes #177