Ah yes. I am afraid that testing castling legality for moving through check is still on the to-do list. I suppose all I have to do is set the e.p. squares to all the squares the King moved through.
[Edit] I did that now, and although the castling is still highlighted, it will not be accepted when the King starts in, or passes through check. The error message it gives in that case is strange, though, and I do not understand how it can be given:
hit2=1
Trading of this piece is not allowed
This is generated by GAME code:
print . hit2= #hit;
if == #hit Xdummy: // the 'royal' was actually a banned trade
die "Trading of this piece is not allowed";
elseif #checkrule and #hit: // he can and we care
die "This exposes your royal piece to capture";
endif;
As the preceding print shows that #hit contains 1 here, how can it compare as equal to the constant string Xdummy???
Ah yes. I am afraid that testing castling legality for moving through check is still on the to-do list. I suppose all I have to do is set the e.p. squares to all the squares the King moved through.
[Edit] I did that now, and although the castling is still highlighted, it will not be accepted when the King starts in, or passes through check. The error message it gives in that case is strange, though, and I do not understand how it can be given:
hit2=1
Trading of this piece is not allowed
This is generated by GAME code:
As the preceding print shows that #hit contains 1 here, how can it compare as equal to the constant string Xdummy???