From: H.G.Muller Date: Thu, 5 Feb 2015 18:44:10 +0000 (+0100) Subject: Allow friend-trampling format also for royal castlings X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=6b0c328eee9be28c1d917ec14b06440582564a65;p=xboard.git Allow friend-trampling format also for royal castlings The restriction that the trampling piece should not be King is lifted. That the piece has an O atom in its Betza string is enough to qualify. --- diff --git a/backend.c b/backend.c index 43df74d..dbfb234 100644 --- a/backend.c +++ b/backend.c @@ -10011,8 +10011,8 @@ ApplyMove (int fromX, int fromY, int toX, int toY, int promoChar, Board board) if(gameInfo.variant == VariantKnightmate) king += (int) WhiteUnicorn - (int) WhiteKing; - if(piece != WhiteKing && piece != BlackKing && pieceDesc[piece] && killX >= 0 && strchr(pieceDesc[piece], 'O') // Betza castling-enabled - && (piece < BlackPawn ? killed < BlackPawn : killed >= BlackPawn)) { // and captures own + if(pieceDesc[piece] && killX >= 0 && strchr(pieceDesc[piece], 'O') // Betza castling-enabled + && (piece < BlackPawn ? killed < BlackPawn : killed >= BlackPawn)) { // and tramples own board[toY][toX] = piece; board[fromY][fromX] = EmptySquare; board[toY][toX + (killX < fromX ? 1 : -1)] = killed; board[EP_STATUS] = EP_NONE; // capture was fake!