Castling issue #511
DarinCBrown
started this conversation in
Variants
Replies: 1 comment
-
Hi. If you want to enable castling with a non-rook piece you need to define the castlingRookPiece in order to tell it which piece the king should castle with. After that I assume it should work. What might be confusing is that the default already is specified as "r". However, the piece labels generally are resolved at the time a variant is defined, so when you inherit from another variant the "r" was already resolved as a rook for that variant. Therefore if you redefine "r" you also need to explicitly redefine the castlingRookPiece as this new "r" piece. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, everyone
Minimal computer knowledge (beyond a few programming classes 25 years ago) and very new to FSF -- just trying to learn everything on my own. I only use the playground so far.
I wanted to try out a conservative variant of orthodox chess. Here is the ini file I uploaded:
[ourtestvariant:chess]
knight = -
bishop = -
rook = -
queen = -
customPiece1 = n:NmF
customPiece2 = b:BmW
customPiece3 = r:RmF
customPiece4 = q:QmN
promotionPieceTypes = nbrq
After compiling, I get
uciok
Parsing variant: ourtestvariant
No castling rook for flag k
startFen - Invalid starting position: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
id name Fairy-Stockfish [commit: 014622b8, upstream: , emscripten: 2.0.26] LB
id author Fabian Fichter
If I add "castling = false", then it compiles with no issues and plays exactly as intended... except of course, castling isn't allowed.
I've tried several workarounds, but no luck. Any help is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions