From: H.G.Muller Date: Mon, 3 Nov 2014 20:51:46 +0000 (+0100) Subject: Fix sweep promotions for Lance on deeper zones X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=07713bc9c098f6accb3228d75319256cd1eaef1a;p=xboard.git Fix sweep promotions for Lance on deeper zones Unlike Pawns, Lances always assumed a zone depth of 1 in deciding on activating sweep promotion. (Because they did not naturally occur in any variant that had a deeper zone.) --- diff --git a/backend.c b/backend.c index 552935e..bdafe3d 100644 --- a/backend.c +++ b/backend.c @@ -7323,8 +7323,8 @@ CanPromote (ChessSquare piece, int y) gameInfo.variant == VariantMakruk || gameInfo.variant == VariantASEAN) return FALSE; return (piece == BlackPawn && y <= zone || piece == WhitePawn && y >= BOARD_HEIGHT-1-zone || - piece == BlackLance && y == 1 || - piece == WhiteLance && y == BOARD_HEIGHT-2 ); + piece == BlackLance && y <= zone || + piece == WhiteLance && y >= BOARD_HEIGHT-1-zone ); } void