[ 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 Programming Piece Movement in Game Courier. A tutorial on two different ways to program piece movement in Game Courier.[All Comments] [Add Comment or Rating] A. M. DeWitt wrote on Wed, Nov 8, 2023 08:43 PM UTC in reply to Fergus Duniho from Tue Nov 7 10:43 PM:This preset for Chu Seireigi shows the bug in action. It defines the Queen as a Metamachy Gryphon with an additional direction to show what happens with repeated non-final directions. The relevant code is: map n 0 1 s 0 -1 w -1 0 e 1 0; // Orthogonal directions map nw -1 1 ne 1 1 sw -1 -1 se 1 -1; // Diagonal directions def Queen logride #0 #1 (nw n) (nw w) (ne n) (ne e) (sw s) (sw w) (se s) (se e) (nw nw n); def Queen-Range lograys #0 (nw n) (nw w) (ne n) (ne e) (sw s) (sw w) (se s) (se e) (nw nw n); The last direction is not repeated indefinitely. It only repeats as many times as the direction before it is repeated.
This preset for Chu Seireigi shows the bug in action. It defines the Queen as a Metamachy Gryphon with an additional direction to show what happens with repeated non-final directions.
The relevant code is:
map n 0 1 s 0 -1 w -1 0 e 1 0; // Orthogonal directions
map nw -1 1 ne 1 1 sw -1 -1 se 1 -1; // Diagonal directions
def Queen logride #0 #1 (nw n) (nw w) (ne n) (ne e) (sw s) (sw w) (se s) (se e) (nw nw n);
def Queen-Range lograys #0 (nw n) (nw w) (ne n) (ne e) (sw s) (sw w) (se s) (se e) (nw nw n);
The last direction is not repeated indefinitely. It only repeats as many times as the direction before it is repeated.