Check out Grant Acedrex, our featured variant for April, 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]
Daniel Zacharias wrote on Thu, Jan 19, 2023 05:04 AM UTC in reply to Fergus Duniho from 02:47 AM:

That helped a lot! Now I have this, which does capture, but the check for whether the destination is empty doesn't work, and I haven't found a way to have the post-move code check the value of the piece captured in this way.

sub P from to;
    verify > rank #to rank #from;
    verify (empty #to);
    verify or (checkaride #from #to -1 1 or checkaride #from #to 0 1) (and == distance #from #to 2 or checkahop #from #to -1 1 checkahop #from #to 0 1);
    set hopped screen;
    if (not empty #hopped):
        capture #hopped;
    endif;