From cbe44e66e941699c7546a62e39fb05581bcf652a Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sun, 18 Dec 2022 14:19:14 +0100 Subject: [PATCH] Allow Duck move on PGN castling The parser now also scans for a Duck move after O-O or O-O-O. --- parser.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/parser.c b/parser.c index 630a782..7e71619 100644 --- a/parser.c +++ b/parser.c @@ -706,6 +706,11 @@ badMove:// we failed to find algebraic move } sprintf(currentMoveString, "%c%c%c%c%c",ff+AAA,rf+ONE,ft+AAA,rt+ONE,promo); if (appData.debugMode) fprintf(debugFP, "(%d-type) castling %d %d\n", castlingType, ff, ft); + if(**p == ',' && gameInfo.variant == VariantDuck) { + killX = (*p)[1] - AAA; killY = (*p)[2] - ONE; + sprintf(currentMoveString + 4, ";%c%c", (*p)[1], (*p)[2]); + *p += 3; + } return (int) LegalityTest(boards[yyboardindex], PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: e.p.! -- 1.7.0.4