From: H.G.Muller Date: Tue, 7 Oct 2014 17:13:54 +0000 (+0200) Subject: Let t on final leg in Betza notation forbid checking X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=69cea22f2209a7038242a3e782ef41777f8410bb Let t on final leg in Betza notation forbid checking 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. --- 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);