From: H.G.Muller Date: Fri, 24 Jul 2015 21:55:35 +0000 (+0200) Subject: Fix bridge capture of Lions X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=47ab0b03122be14ab46fc307e936178b8e62cc22 Fix bridge capture of Lions Clearing the kill square for the check test had broken the test for it being empty or containing a Pawn. We now also test for Go Between, which was not done at all. --- diff --git a/moves.c b/moves.c index 4158ea5..b5b6ffe 100644 --- a/moves.c +++ b/moves.c @@ -1673,10 +1673,11 @@ CheckTest (Board board, int flags, int rf, int ff, int rt, int ft, int enPassant } ep = board[EP_STATUS]; if( captured == WhiteLion || captured == BlackLion ) { // [HGM] lion: Chu Lion-capture rules - ChessSquare victim = killX < 0 ? EmptySquare : trampled; + ChessSquare victim = saveKill < 0 ? EmptySquare : trampled; if( (board[rt][ft] == WhiteLion || board[rt][ft] == BlackLion) && // capturer is Lion (ff - ft > 1 || ft - ff > 1 || rf - rt > 1 || rt - rf > 1) && // captures from a distance - (victim == EmptySquare || victim == WhitePawn || victim == BlackPawn) ) // no or worthless 'bridge' + (victim == EmptySquare || victim == WhitePawn || victim == BlackPawn // no or worthless 'bridge' + || victim == WhiteCobra || victim == BlackCobra) ) // (Pawn or Go Between) board[EP_STATUS] = EP_ROYAL_LION; // on distant Lion x Lion victim must not be pseudo-legally protected } }