From 69cea22f2209a7038242a3e782ef41777f8410bb Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 7 Oct 2014 19:13:54 +0200 Subject: [PATCH] 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. --- moves.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 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); -- 1.7.0.4