From: H.G.Muller Date: Tue, 7 Oct 2014 16:56:59 +0000 (+0200) Subject: Implement Betza hr and hr as chiral move sets X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=797a64530ce2e1bd227cb24f46dfa659c16561f6 Implement Betza hr and hr as chiral move sets To easily separate right- and left-handed moves on oblique atoms (which needs opposite use of l and r in their multi-leg continuations), the direction sets hr and hl are added. --- diff --git a/moves.c b/moves.c index 647aa44..aed8d7c 100644 --- a/moves.c +++ b/moves.c @@ -300,6 +300,9 @@ MovesFromString (Board board, int flags, int f, int r, int tx, int ty, int angle break; case 'N': all = 0xFF; // oblique atom (degenerate 8-fold) if(tx >= 0) goto king; // continuation legs specified in K/Q system! + if(*desc == 'h') { // chiral direction sets 'hr' and 'hl' + dirSet = (desc[1] == 'r' ? 0x55 : 0xAA); desc += 2; + } else 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