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

The birth of 3 new variants - part 2 : Grand Apothecary Chess Modern[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Wed, Jul 7, 2021 06:12 PM UTC in reply to Aurelian Florea from 06:43 AM:

Since Markdown altered your code by removing the multiplication operators, and HTML interprets the less than sign as the beginning of a tag, I am responding in Text. Here is your code for the Lyon: def Lyon fn (checkride #0 #1 1 0 and empty #0) where #0 * 2 sign - file #1 file #0 * 2 sign - rank #1 rank #0 #1 and not fn Knight #0 #1 or and checkride #0 #1 1 1 <= distance #0 #1 2 or fn Dabbabah #0 #1; To rule out regular Rook moves, this should fix it. This produced the correct pattern on an empty 8x8 board with e4 as the origin and also when I blocked the diagonal move at f5. def Lyon checkaride #ts #1 0 sign #rd or checkaride #ts #1 sign #fd 0 and checkride #0 #ts 1 1 and empty #ts =ts where #0 * 2 sign #fd * 2 sign #rd and match 2 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; Instead of using a lambda function, this assigns values to variables that get reused. These are rd for rank distance, fd for file distance, and ts for turning space. After calculating fd and rd, it makes sure that one of them has an absolute value of 2. It then uses them to calculate ts. After checking that ts is empty, it checks that a diagonal move from #0 to #ts is legal, and it then uses the value of fd or rd with checkaride for checking a Rook move in a specific direction from #ts to #1. It first checks for a Rook move along the file of ts. If that returns false, it then checks for a Rook move along the rank of ts. When I tried checkride #ts 1 1 0, it gave inaccurate results. The following code gave the right results on an empty board, but it gave false positives when I blocked it on f5. def Lyon fn (checkride #0 #1 1 0 and empty #0) where #0 * 2 sign - file #1 file #0 * 2 sign - rank #1 rank #0 #1 and not fn Knight #0 #1 and not checkride #0 #1 1 0 or and checkride #0 #1 1 1 <= distance #0 #1 2 or fn Dabbabah #0 #1; I will let you figure out how to fix the Tiger, since you should have more of a clue now.