Check out Modern Chess, our featured variant for January, 2025.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Game Courier Developer's Guide. Learn how to design and program Chess variants for Game Courier.[All Comments] [Add Comment or Rating]
Greg Strong wrote on Fri, Jul 24, 2020 12:46 AM UTC:

I'm making a rule-enforcing preset for Shatranj Kamil X and I'm almost done but for one minor annoyance I don't understand.

In addition to pawn promotion, the Ferz also automatically promotes to a W on the last rank.  So, in Post-Move I added:

if and == $moved F == rank $dest 9:
  add W $dest;
endif;

This works fine, except that after the promotion, it shows the Ferz in the "captured pieces" which isn't really accurate.  So I added a line:

if and == $moved F == rank $dest 9:
  add W $dest;
  setelem capturedpieces F dec elem F capturedpieces;
endif;

I think this should work but it does not...  Any thoughts appreciated.