Ah yes, I did not pay any attention to that since Fergus responded to my question. Everything should work, except that the highlingting doesn't suppress moves of pieces when there is an edge-capture to make. My idea for that was to add some Post-Game code to post-edit the list of legal moves by throwing away all moves that are not edge captures. If the list is empty, thenthe original list was OK, if it is not, the cleansed list becomes the new list.
There still is one other thing I don't like in the code, though. The include code now calls a routine BadZone to vet the pseudo-legal moves it generates, when 'zonal' is set to 1. This routine gets all squares of the move passed (origin, destination, locust square, drop square, and even dropped type). Currently it is blind to any 'hop squares', though. While there also exist variants (Janggi!) where a hopper cannot hop over some piece types. The hop square is not part of the move description, though. For that reason the code can handle moves with arbitrarily many hops (while the number of locust victims is limited to 1).
If I ever change the inteface between BadZone and the rest of the code, it would break all presets that relied on this interface. (Because the BadZone definitions are in the presets, and the change would be in the included file.) So perhaps I should better fix this first.
Ah yes, I did not pay any attention to that since Fergus responded to my question. Everything should work, except that the highlingting doesn't suppress moves of pieces when there is an edge-capture to make. My idea for that was to add some Post-Game code to post-edit the list of legal moves by throwing away all moves that are not edge captures. If the list is empty, thenthe original list was OK, if it is not, the cleansed list becomes the new list.
There still is one other thing I don't like in the code, though. The include code now calls a routine BadZone to vet the pseudo-legal moves it generates, when 'zonal' is set to 1. This routine gets all squares of the move passed (origin, destination, locust square, drop square, and even dropped type). Currently it is blind to any 'hop squares', though. While there also exist variants (Janggi!) where a hopper cannot hop over some piece types. The hop square is not part of the move description, though. For that reason the code can handle moves with arbitrarily many hops (while the number of locust victims is limited to 1).
If I ever change the inteface between BadZone and the rest of the code, it would break all presets that relied on this interface. (Because the BadZone definitions are in the presets, and the change would be in the included file.) So perhaps I should better fix this first.