Umm, indeed. It seems I spoiled this when adding fast castling. There one always also has a 1-step castling possibility, and to avoid the ambiguity this causes it has to be entered as capture of the Rook you want to castle with. Normal 1-step castling also would require such a kludge, but so far was never implemented (because it occurs only rarely). So for normal castling moving the King on top of your own Rook would be interpreted as castling to the Rook square. The code I added to take care of the fast-castling case relied on the setting of a 'realto' variable, which would hold the true King destination if the input move put that at the Rook. As last thing during move execution the King would then be moved there. But in case of normal castling this 'realto' currently remains undefined, and moving the King there would make it disappear.
For now I let normal castling always set 'realto' to the King location indicated by the input move. This should fix the problem in Skica.
This means there is still no support for O1 castling. But when it would be needed I suppose it can now be easily implemented by replacing the destination of the generated move by the Rook location in the generated move when the King makes only a single step. (Which the fast-castling generator already does.) But that would still leave an issue in variants where the King can both make a single step or end at the Rook square. One then would have to design a move-entry kludge for distinguishing those moves. I suppose entering 1-step castling as RxK would not be very crazy, as in this case the Rook would indeed end on the King square (and it cannot be confused with any legal Rook move).
Umm, indeed. It seems I spoiled this when adding fast castling. There one always also has a 1-step castling possibility, and to avoid the ambiguity this causes it has to be entered as capture of the Rook you want to castle with. Normal 1-step castling also would require such a kludge, but so far was never implemented (because it occurs only rarely). So for normal castling moving the King on top of your own Rook would be interpreted as castling to the Rook square. The code I added to take care of the fast-castling case relied on the setting of a 'realto' variable, which would hold the true King destination if the input move put that at the Rook. As last thing during move execution the King would then be moved there. But in case of normal castling this 'realto' currently remains undefined, and moving the King there would make it disappear.
For now I let normal castling always set 'realto' to the King location indicated by the input move. This should fix the problem in Skica.
This means there is still no support for O1 castling. But when it would be needed I suppose it can now be easily implemented by replacing the destination of the generated move by the Rook location in the generated move when the King makes only a single step. (Which the fast-castling generator already does.) But that would still leave an issue in variants where the King can both make a single step or end at the Rook square. One then would have to design a move-entry kludge for distinguishing those moves. I suppose entering 1-step castling as RxK would not be very crazy, as in this case the Rook would indeed end on the King square (and it cannot be confused with any legal Rook move).