The ApplyMove routine assumed that any lateral King step of more than
a single square was a castling, and then swung the nearest piece in
that direction around the King. This failed in Grande Acedrex, where
the King can (amongst others) jump 2 squares sideways as an initial move.
So we now first check if the King has its moves redefined in a way that
does specify no castling but does specify other initial moves, and perform
any move as just a simple King move in that case.
}
/* End of code added by Tord */
+ } else if (pieceDesc[piece] && piece == king && !strchr(pieceDesc[piece], 'O') && strchr(pieceDesc[piece], 'i')) {
+ board[fromY][fromX] = EmptySquare; // never castle if King has virgin moves defined on it other than castling
+ board[toY][toX] = piece;
} else if (board[fromY][fromX] == king
&& fromX != BOARD_LEFT && fromX != BOARD_RGHT-1 // [HGM] cylinder */
&& toY == fromY && toX > fromX+1) {