[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Single Comment
This also works:
def Lyon
checkride #ts #1 0 1
and checkride #0 #ts 1 1
and empty #ts
=ts where #0 * 2 sign #fd * 2 sign #rd
and == 2 min abs #fd abs #rd
=fd - file #1 file #0
=rd - rank #1 rank #0
or and checkride #0 #1 1 1 <= distance #0 #1 2
or fn Dabbabah #0 #1;
There are two main changes. Instead of "and match 2 abs #fd abs #rd", it now has "and == 2 min abs #fd abs #rd". Besides checking that one value is equal to 2, it also confirms that the other value is greater than or equal to 2. This rules out spaces that could be reached by a Knight's leap. This change allows the Rook move to be checked with a single checkride instead of two different checkarides with calculated values. In the tests I ran, it gave the same results as the previous Lyon function.