Forced insufficient material#821
Open
johndoknjas wants to merge 6 commits into
Open
Conversation
…l` in terms of `opponentHasInsufficientMaterial`, and then update derived variant classes to implement their own `playerHasInsufficientMaterial`.
…(the 'player' in new positions) having insufficient mating material, then the opponent has insufficient mating material now.
…any non-captures first to falsify quicker.
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.
From the FIDE handbook:
If all of a player's legal moves reach a position where the opponent cannot win, then in the current position the opponent should be considered to have insufficient mating material. E.g., for this example, this PR would make the game be declared drawn if Black ran out of time.
Note that the changes made in the
variantsubfolder (commit f689821) are not strictly needed, but it's less confusing to now not have turn-agnostic logic anywhere.