Skip to content

Preserve castling rights for promoted kings on a SuicideBoard - #1202

Open
jacksonthall22 wants to merge 2 commits into
niklasf:masterfrom
hyprchs:master
Open

Preserve castling rights for promoted kings on a SuicideBoard#1202
jacksonthall22 wants to merge 2 commits into
niklasf:masterfrom
hyprchs:master

Conversation

@jacksonthall22

@jacksonthall22 jacksonthall22 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

In a SuicideBoard, you can promote to a king, but when a promoted king moves, current code incorrectly removes castling rights unilaterally even if the original king and rooks haven't moved:

image

Fixes that and adds a regression test.

Funnily enough, Antichess on Lichess forbids castling outright. Not sure what the history of Antichess vs. Suicide Chess is and what the behavior here should be, or if python-chess should support a separate Antichess variant board... but in any case I was confused when I also could not reproduce the expected behavior on Lichess - notice that loading this link with KQ castling rights specified in the URL just strips them in the FEN box on the page 😂

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.

1 participant