From: H.G. Muller Date: Wed, 30 Nov 2011 14:38:21 +0000 (+0100) Subject: Put promo-suffix on ICS move in variant seirawan castlings X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=377bf9818b41e22a35bf96ede1252cd7088e8a66;p=xboard.git Put promo-suffix on ICS move in variant seirawan castlings The distinction upper-case / lowercase determines gating at R / K --- diff --git a/backend.c b/backend.c index 4d4b6fa..14cdf0c 100644 --- a/backend.c +++ b/backend.c @@ -4952,6 +4952,11 @@ SendMoveToICS(moveType, fromX, fromY, toX, toY, promoChar) char promoChar; { char user_move[MSG_SIZ]; + char suffix[4]; + + if(gameInfo.variant == VariantSChess && promoChar) + snprintf(suffix, 4, "=%c", toX == BOARD_WIDTH<<1 ? ToUpper(promoChar) : ToLower(promoChar)); + else suffix[0] = NULLCHAR; switch (moveType) { default: @@ -4967,7 +4972,7 @@ SendMoveToICS(moveType, fromX, fromY, toX, toY, promoChar) case WhiteHSideCastleFR: case BlackHSideCastleFR: /* POP Fabien */ - snprintf(user_move, MSG_SIZ, "o-o\n"); + snprintf(user_move, MSG_SIZ, "o-o%s\n", suffix); break; case WhiteQueenSideCastle: case BlackQueenSideCastle: @@ -4977,7 +4982,7 @@ SendMoveToICS(moveType, fromX, fromY, toX, toY, promoChar) case WhiteASideCastleFR: case BlackASideCastleFR: /* POP Fabien */ - snprintf(user_move, MSG_SIZ, "o-o-o\n"); + snprintf(user_move, MSG_SIZ, "o-o-o%s\n",suffix); break; case WhiteNonPromotion: case BlackNonPromotion: