From 7dd2dda538db6438283c4a92c24080b0bb122230 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Fri, 31 Oct 2014 23:46:13 +0100 Subject: [PATCH] Make the promotion zone always 3 deep in Elven Chess The promotion zone in Eleven Chess was treated as in Shogi, and set to the board height divided by 3. It is better to always make it 3. This only makes a difference when the boardHeight is overruled, but Elven Chess is a very useful parent variant when a 3-deep promotion zone is needed. (Makruk would only allow promotion to Ferz, and Grand Chess would need holdings and allow only promotion to captured pieces.) --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index 857dcca..cb564b4 100644 --- a/backend.c +++ b/backend.c @@ -6551,7 +6551,7 @@ HasPromotionChoice (int fromX, int fromY, int toX, int toY, char *promoChoice, i int p = piece >= BlackPawn ? BLACK_TO_WHITE piece : piece; promotionZoneSize = BOARD_HEIGHT/3; highestPromotingPiece = (p >= WhiteLion || PieceToChar(piece + 22) == '.') ? WhitePawn : WhiteLion; - } else if(gameInfo.variant == VariantShogi || gameInfo.variant == VariantChuChess) { + } else if(gameInfo.variant == VariantShogi) { promotionZoneSize = BOARD_HEIGHT/3; highestPromotingPiece = (int)WhiteAlfil; } else if(gameInfo.variant == VariantMakruk || gameInfo.variant == VariantGrand || gameInfo.variant == VariantChuChess) { -- 1.7.0.4