From: H.G.Muller Date: Sun, 28 Sep 2014 19:27:22 +0000 (+0200) Subject: Implement ff etc. in Betza parser X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=da0fb381172ddf9800e6a378419630d92ce316cb;p=xboard.git Implement ff etc. in Betza parser Dupliacated directional modifiers can be needed with oblique moves to unambiguously specify a direction set, e.g. ffrrN. --- diff --git a/moves.c b/moves.c index 015f5f2..5af3c47 100644 --- a/moves.c +++ b/moves.c @@ -276,8 +276,8 @@ MovesFromString (Board board, int flags, int f, int r, char *desc, MoveCallback while(islower(*desc) && (i = dirType[*desc-'a']) != '0') { int b = dirs2[*desc-'a']; // when alone, use narrow version if(desc[1] == 'h') b = dirs1[*desc-'a'], desc += 2; // dirs1 is wide version - else if(islower(desc[1]) && i < '4' - && ((i | dirType[desc[1]-'a']) & 3) == 3) { // combinable (perpendicular dim) + else if(*desc == desc[1] || islower(desc[1]) && i < '4' + && ((i | dirType[desc[1]-'a']) & 3) == 3) { // combinable (perpendicular dim or same) b = dirs1[*desc-'a'] & dirs2[desc[1]-'a']; // intersect wide & perp narrow desc += 2; } else desc++;