Should attacking an "extinctionPseudoRoyal" piece count as a check in the libraries? #365
Replies: 1 comment
-
Essentially the pseudo-royal pieces in themselves already are a workaround, necessary mainly due to the fact that (Fairy-)SF does a lot of king specific logic (like check detection) that is extremely hard to generalize for some features, e.g., atomic captures and touching kings. In order to avoid massively complicating the code, I introduced this concept which also allows to support some more scenarios, like having multiple royal piece types or multiple pieces of a royal type, which both would otherwise not be possible. So to answer your question whether atomic checks should count as checks: Yes, for sure. The only reason why it is not the case is because pseudo-royal pieces are a workaround to avoid doing such logic in order to keep the code simple. Therefore internally it can not count as a check (in terms of |
Beta Was this translation helpful? Give feedback.
-
This is pretty minor, but something I encountered when messing around with variants that use the "extinctionPseudoRoyal" flag.
The pseudo royal piece behaves as totally royal as far as I can tell - they aren't allowed to move into check, and the game rejects a move if that piece is in check after the move, etc. But when using the libraries (ffish.js in my case), moves that "check" a pseudo royal piece don't actually count as a check. So they won't show up in the generated SAN, and chessgroundx won't highlight the king square.
One variant where this is notable is atomic chess (since it just uses a pseudo royal commoner under the hood), and you can see it on pychess.org. If you compare these two analysis boards:
https://www.pychess.org/analysis/atomic
https://lichess.org/analysis/atomic
then you'll see that checks do not show on pychess but they do show on Lichess. This also means that checkmates don't get notated in the SAN as well, they just show get notated as normal moves.
Now my question - should we make it so that checking a pseudoRoyal piece "counts" as a check? Or really my question is, are there reasons not to? I don't know the full scope of what's achievable by the extinction pieces and the pseudo royal flag. There might be situations in which it makes no sense to do so. Or maybe, it just adds extra work to the implementation? Really, I'm just curious :)
Beta Was this translation helpful? Give feedback.
All reactions