[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Check out Janggi (Korean Chess), our featured variant for December, 2024.
Check out Janggi (Korean Chess), our featured variant for December, 2024.
Fergus,
I created a rules enforcing preset for Makruk, which is working well:
http://play.chessvariants.com/pbm/play.php?game%253DMakruk+%2528Thai+chess%2529%2526settings%253DAlfaerie2r
Now I'm trying to copy the rules in this preset onto another Makruk preset that uses a different set of pieces:
http://play.chessvariants.com/pbm/play.php?game%3DMakruk+%28Thai+chess%29%26settings%3DAlfaerie4r
Unfortunately the latter is not working as expected. I have been doing some troubleshooting, and I think I have identified the issue.
For this preset, instead of a Ferz and Elephant, I'm using upside down pieces Q180 and B180, as well as upside down pawns to represent the promoted pawns (P180).
After making the neccesary changes, I cannot get the preset to calculate the legal moves for these upside down pieces.
I changed the upside down pawn (P180) for a Banner (BA), and the rules worked for the Banner.
My guess is that the logic for the stalemated function does not recognize numbers as part of the code for the piece, which would explain why it would work for a promoted pawn with the shape of a Banner (BA) but not for an upside down pawn (P180) which has numbers as part of the name code of the piece.
This will be a problem if I use Silver generals which have a non-letter code: S! and s!.
I believe the problem is with the onlyupper and onlylower nullary operators. These operators should ignore non-alpha characters.
Can you review the definition of these operators and the stalemate function to make it more generic?
Thanks
Jose