From: H.G.Muller Date: Fri, 31 Oct 2014 22:46:13 +0000 (+0100) Subject: Make the promotion zone always 3 deep in Elven Chess X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=7dd2dda538db6438283c4a92c24080b0bb122230;p=xboard.git 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.) --- 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) {