@Fergus - What would be the best way to manipulate the $legalmoves array, if I want to remove some moves that in hindsight must not be highlighted after all? Would the following code work?
set tmp $legalmoves;
setsytem legalmoves array; // clear the legal list
for m #tmp:
if fn SomeTest #m:
setlegal m;
endif;
next;
You made a typo. setsytem should be setsystem. With that fixed, it looks like it would work. Since the documentation did not mention that it would work, I updated the documentation. But it will work only for legal moves described as arrays of coordinates for $legalmoves. It will not work for legal moves entered as strings.
You made a typo. setsytem should be setsystem. With that fixed, it looks like it would work. Since the documentation did not mention that it would work, I updated the documentation. But it will work only for legal moves described as arrays of coordinates for $legalmoves. It will not work for legal moves entered as strings.