From 07713bc9c098f6accb3228d75319256cd1eaef1a Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Mon, 3 Nov 2014 21:51:46 +0100 Subject: [PATCH] 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.) --- backend.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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 -- 1.7.0.4