[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Check out Janggi (Korean Chess), our featured variant for December, 2024.
Check out Janggi (Korean Chess), our featured variant for December, 2024.
Well, it seems you have been messing up the legdefs array, swapping piece definitions, as the numbers returned by the piece functions no longer correspond to the move definitions for the corresponding piece. In some cases they are even 'out of phase', so that the y-step of a piece is interpreted as a range, and this causes the error when the y-step is too negative.
For example, you have
But in fact the legdefs array contains the definition of Silver in that location, not Knight. You apparently have inserted the Silver definitions before that of Knight, with as a result that the definition of the Knight moves now starts at 187 instead of 135. You cannot juggle the move definitions in legdefs without adapting the piece routines to the new location of their moves.