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

Game Courier Developer's Guide. Learn how to design and program Chess variants for Game Courier.[All Comments] [Add Comment or Rating]
A. M. DeWitt wrote on Sun, Oct 16, 2022 01:29 AM UTC in reply to Fergus Duniho from Sat Oct 15 04:36 PM:

Recently I revived Suzumu Shogi and Mitsugumi Shogi and added a rule to them forbidding burning pieces (Fire Demons and Heveanly Tetrarches) from burning each other. To enforce this in the GC presets, in theory all I need to do is, on the burning move, make sure that the capture (past and potential) doesn't equal those pieces in the relevant function definitions.

If I need to test for a general capture in this situation, that is pretty easy: cond empty #0 capture (not empty #1). By extension, for ensuring a burning piece isn't captured I would, in theory, need to use cond empty #0 (not match old FD +WB +CS) (not match space #1 FD +WB +CS) in the part of the piece function used for the burning moves. The "FD +WB +CS" part is the ids of the burning pieces.

The second output for the cond statement works fine, but the first doesn't. I think what I need is something that will return the value of old at the time the function is called.

Here is the preset link for Suzumu Shogi in case you need to look at the code: Suzumu Shogi on the Chess Variants Game Courier