X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=moves.c;h=ad700e8d6ad4529e92b1e9a00e4802fa9653fe25;hb=69cea22f2209a7038242a3e782ef41777f8410bb;hp=aed8d7c61aa8cd871d5c4fee00eb67a06d0ed529;hpb=797a64530ce2e1bd227cb24f46dfa659c16561f6;p=xboard.git diff --git a/moves.c b/moves.c index aed8d7c..ad700e8 100644 --- a/moves.c +++ b/moves.c @@ -433,6 +433,7 @@ MovesFromString (Board board, int flags, int f, int r, int tx, int ty, int angle 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);