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

Interactive diagrams. Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Mon, Jun 27, 2022 12:34 PM UTC in reply to Aurelian Florea from 11:40 AM:

OK, I see what the problem is. The way the Play-Test Applet generated GAME-code for the King's castling moves that you specified, will lead to the 3-step moves of the King appearing twice in the legdefs array. Once for the Rook, and once for the Cannon castling. The code in the included betza.txt does not need that (because each specified castling step would automatically work with any partner spesified in the 'partners' array), and is in fact not resitant to that. When it gets the first match with the input move (which it supposes to be the only match), it already executes the 'locust capture', in this case the removal of the Rook. When it tries the same King step again, and thus again gets a match with the input move, the Rook is gone, and the Cannon is the closest piece. (And then also removed, and remembered as piece to drop next to the King.)

Easiest way to fix this is to clip the duplicat definition of the 3-step castlings (which luckily happen to be the last two moves of the King) off the move list, by changing a 2 in a 0 (at the start of the commented line). Like

1  1  0  1     3 // king(95)
1  1  1  1     3
1  1  1  0     3
1  1  1 -1     3
1  1  0 -1     3
1  1 -1 -1     3
1  1 -1  0     3
1  1 -1  1     3
2 99  1  0    72
   1  3  0     9
2 99 -1  0    72
   1 -3  0     9
2 99  1  0    72
   1  4  0     9
2 99 -1  0    72
   1 -4  0     9
2 99  1  0   33554504
   1  2  0     9
2 99 -1  0   33554504
   1 -2  0     9
0 99  1  0   33554504 // here a 0 for the number of legs indicates no more moves follow
   1  3  0     9
2 99 -1  0   33554504
   1 -3  0     9
0