From da0fb381172ddf9800e6a378419630d92ce316cb Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sun, 28 Sep 2014 21:27:22 +0200 Subject: [PATCH] Implement ff etc. in Betza parser Dupliacated directional modifiers can be needed with oblique moves to unambiguously specify a direction set, e.g. ffrrN. --- moves.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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++; -- 1.7.0.4