Feature Request: Add a new chess variant Duck Chess#1200
Open
shubham-dce wants to merge 2 commits into
Open
Conversation
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.
Type: New chess variant
Motivation
python-chesscurrently supports several standard variants (Suicide, Atomic, King of the Hill, Crazyhouse, etc.) but does not support Duck Chess.Duck Chess is a variant where a "duck" piece occupies one square and blocks movement for both sides. After every normal move, the player who moved must also relocate the duck before the turn passes to the opponent.
This PR adds
DuckChessBoardunderchess.variant, following the same structure as the existing variant subclasses.What's included
chess/variant.pyDuckChessBoard(chess.Board)class.duck_squareduck_phasepush()/pop()handling so that a full turn consists of:FEN, UCI, and SAN support
@<square>notation.Game rules
Variant registration
chess.variant.find_variant("duck")DuckDuck ChessDuckchessTests
Added tests covering:
Documentation
DuckChessBoardentry todocs/variant.rst.Testing
test.py— all passing.