To allow approximate definition of pieces that are too difficult to
describe exactly, we can revoke their capture rights on Kings,
to prevent imagined moves that happen to threaten a King forces the
opponent to evade this imagined check, making most of his moves illegal.
Then the piece can be safely replaced by an upward-compatible one,
leaving rejection of the extra moves to the engine.
cb(board, flags, mine == 1 ? WhiteKingSideCastle : BlackKingSideCastle, r, f, y, f + expo, cl);
break;
}
+ if(mode & 16 && (board[y][x] == WhiteKing || board[y][x] == BlackKing)) break; // tame piece, cannot capture royal
if(occup & mode) cb(board, flags, NormalMove, r, f, y, x, cl); // allowed, generate
if(occup != 4) break; // not valid transit square
} while(--i);