The Chess Variant Pages

[ 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

Shatranj Kamil (64). Modern Shatranj-based variant with new pieces.[All Comments] [Add Comment or Rating]
Greg Strong wrote on 2020-07-11 UTC

New rule-enforcing presets for David Paulowich's Shatranj Kamil (64) using the new fairychess include file. The existing presets had no automation or rule enforcement. The abstract graphics option includes the new silver general graphic which has been added to the East-West piece set group.

One thing I needed to figure out was how to implement the elephant, which moves as Alfil or non-capturing Dabbabah (AmD). I did not want to make both a function and subroutine so I used the cond empty #0 trick described in the Fairychess include file tutorial to distinguish between potential and actual moves. Looking at the sample code for the cannon, I was able to come up with this solution:

def Alfil_nc_Dabbabah cond cond empty #0 capture (not empty #1) (checkleap #0 #1 2 2) (or checkleap #0 #1 2 0 checkleap #0 #1 2 2) and #1;