From 6b0c328eee9be28c1d917ec14b06440582564a65 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Thu, 5 Feb 2015 19:44:10 +0100 Subject: [PATCH] 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. --- backend.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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! -- 1.7.0.4