Greg Strong wrote on Mon, Nov 14, 2022 11:54 PM UTC:
We cross-posted. I hadn't seen your latest message when I posted mine.
Instead of figuring out which additional moves have to be tried, I just try all moves again, including those that were temporarily rejected for the IllegalUnlessOnly reason, by redoing the entire node in a tail recursion.
Thank you, this makes a lot of sense. It is cleaner and should occur so infrequently that the cost is minimal.
I don't see this as a feature dedicated to a single variant, but as a general mechanism to switch off certain rules in the 'only-move' case
Certainly. I'd imagine there are other cases that will turn up.
Of course one can argue that this entire anti-trading business is pretty much a dedicated feature for Chu Shogi
Sure, but Chu Shogi is important enough to warrant support and the anti-trading rules are appealing enough that they have been implemented in some fashion in several variants (Elven Chess, Golem Chess, Odyssey). BTW, I now support Elven Chess, although still not Chu, mostly because I haven't found the significant time it will take to code all that and gather the graphics.
We cross-posted. I hadn't seen your latest message when I posted mine.
Thank you, this makes a lot of sense. It is cleaner and should occur so infrequently that the cost is minimal.
Certainly. I'd imagine there are other cases that will turn up.
Sure, but Chu Shogi is important enough to warrant support and the anti-trading rules are appealing enough that they have been implemented in some fashion in several variants (Elven Chess, Golem Chess, Odyssey). BTW, I now support Elven Chess, although still not Chu, mostly because I haven't found the significant time it will take to code all that and gather the graphics.