[ 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.
I ran again into a problem. I am trying to generate an array of squares reachable by a ride in a given direction, through
where cursqr is a formal parameter to the NextLeg subroutine, and dx and dy are my variables. When I follow this by
it prints something like this, though:
Instead of the expected array of squares I get an array that always has two elements, where the second element always has the value of dy and the first element is always an array containing a single square, namely the first square on the path. It looks a lot like the ride operator fails to absorb its third argument, leaving it for the set command to group it with the returned result into an array. Yet it must have seen the operand, because the first square in the array it returns took it into account. And it fails to return the remaining squares on the path; f4 would also have been empty.
[Edit] It seems the array that is the first element does not always contain just one square. Apparently it continues the ride for as long as the squares are occupied, rather than empty...