It seems there is a bug in the Applet for generating this 'partners' array. I am pretty sure it worked before. But I had a regression at some point in the Diagram script, when I apparently uploaded a 'fix' applied to an older version, and this probably lost the code for identifying castling partners.Castling doesn't even work in the Diagram itself. (Not obvious, as for legacy reasons it always allows the user to castle with a Rook. But the AI cannot do it anymore.)
The only way to remove a piece is to capture it (and only pseudo-legal moves can capture!).
It seems there is a bug in the Applet for generating this 'partners' array. I am pretty sure it worked before. But I had a regression at some point in the Diagram script, when I apparently uploaded a 'fix' applied to an older version, and this probably lost the code for identifying castling partners.Castling doesn't even work in the Diagram itself. (Not obvious, as for legacy reasons it always allows the user to castle with a Rook. But the AI cannot do it anymore.)
The only way to remove a piece is to capture it (and only pseudo-legal moves can capture!).