From: H.G.Muller Date: Sun, 18 Dec 2022 13:19:14 +0000 (+0100) Subject: Allow Duck move on PGN castling X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=cbe44e66e941699c7546a62e39fb05581bcf652a;p=xboard.git Allow Duck move on PGN castling The parser now also scans for a Duck move after O-O or O-O-O. --- 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.!