Check out Glinski's Hexagonal Chess, our featured variant for May, 2024.


[ 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

How to Enforce Rules in Game Courier. A tutorial on programming a rule-enforcing preset in the GAME Code language.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Thu, Mar 9, 2023 11:21 PM UTC in reply to Daniel Zacharias from 08:20 PM:

As an example of how you can handle non-displacement captures, I have been working on a new preset for Ultima today. I'm writing *_MOVE and *_CHECK functions as separate functions, and I'm using the main function for a piece to call the appropriate function depending on the value of #movetype.

If you use your functions for actual moves, as I have been doing so far, you should set movetype to MOVE in your Pre-Game code. This will give it a default value when you're not in checked or stalemated.

I have already written code for the Withdrawer, and you might be able to figure out how to make its capture optional.