Comments/Ratings for a Single Item
@Fergus: I have an error while playing a game of Devingt Chess with Whites: ILLEGAL: C g1-h4 on turn 9:
There was no C on g1. The piece on g1 is a S.
Go back with your browser's BACK button, reload the page, and try again.
When I edit the file I see this: alias c Z C Z;
I guess here lies the error, shouldn't it be: alias c z C Z;
Could you please correct it Fergus, so we can play our game? Thank you.
By testing I see that Black side has the same problem while playing the Camel/Sage.
Getting the same error message.
@Fergus: in fact the second line of this block just should be deleted.
alias s c S C;
alias c Z C Z;
As is, it is impossible to play the Camels-Sages. I cannot do it and save it because this page is yours.
Please, could you do it? Thank you very much.
@Fergus: in fact the second line of this block just should be deleted.
alias s c S C;
alias c Z C Z;
That wasn't what needed to be fixed. When I changed the setlegal commands in the stalemated subroutine to take strings instead of coordinate arrays as arguments, I didn't make sure they used aliases. I have now fixed that.
OK thank you Fergus, it solved the issue.
You know better than me of course, but when I duplicated your preset and removed that line, it worked too. Just for me to know and understand how to code these, why is this line with a Z, I see no piece called Z. And if a Z is needed, is it normal to have c Z C Z and not c z C Z? or it is a error with no consequence?
Thanks again
This is explained in the tutorial for the fairychess include file. The first alias says we want to use s and S as notation for the pieces labeled c and C. The second prevents c or C from being used as alternate notation for s or S by setting these as aliases for a non-existent piece. Since the main feature of this piece is that it doesn't exist, the same piece label can be reused.
What you did was reenable the use of c or C as notation.
@Fergus: thanks for this kind explanation
8 comments displayed
Permalink to the exact comments currently displayed.
I programmed this game today using the fairychess include file. While it was mostly a cut-and-paste job with some tweaking, I also had to fix bugs in Game Courier itself and the fairychess include file, because there were some issues with aliases that I hadn't accounted for.
I was previously wrong about needing to handle castling as a two-part move. I probably had that on my mind from working on code for that recently. Castling has been handled as a one-part move. I tested castling, en passant capture, and Pawn promotion, and it all seems to be working correctly now.