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]
Daniel Zacharias wrote on Wed, Jan 12, 2022 08:23 PM EST in reply to Bn Em from 08:07 PM:

That doesn't quite work, because leaps checks all four directions instead of just forwards and backwards. Maybe checkride shouldn't work either, but I tried it and it seems to.

This works for the Snake

def U fn (checkaride #0 #1 1 1 and empty #0)
    where #0 0 1
    #1
    or fn (checkaride #0 #1 -1 1 and empty #0)
    where #0 0 1
    #1
    or fn (checkaride #0 #1 1 1 and empty #0)
    where #0 0 1
    #1
    or fn (checkaride #0 #1 -1 -1 and empty #0)
    where #0 0 -1
    #1
    or fn (checkaride #0 #1 1 -1 and empty #0)
    where #0 0 -1
    #1
    or checkaleap #0 #1 0 1
    or checkaleap #0 #1 0 -1;

def UL mergeall
    ray where #0 0 1 1 1
    ray where #0 0 1 -1 1
    ray where #0 0 -1 -1 -1
    ray where #0 0 -1 1 -1
    where #0 0 1
    where #0 0 -1;