From: H.G. Muller Date: Mon, 1 Nov 2010 11:41:36 +0000 (+0100) Subject: Implement e.p.-less initial double-moves X-Git-Tag: 4.8P~11 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=6bb0ca7a95818cda8b6a08b8815359203af4d84b;p=fairymax.git Implement e.p.-less initial double-moves The leaper bit in the secondary rights (in combination with primary rights = 4, the double-push code) is used to indicate the e.p. square should not be set. In this case the secondary hopper bit indicates if the double push can even be made if the intermediate square is occupied (to make it a rank-dependent leaper move rather than a true double- push). In al cases these secondary bits are cleared. --- diff --git a/fairymax.c b/fairymax.c index d02f86a..3b2db59 100644 --- a/fairymax.c +++ b/fairymax.c @@ -248,7 +248,7 @@ int k,q,l,e,E,z,n; /* (q,l)=window, e=current eval. score, E=e.p. sqr.*/ ((b[G=r<0?x&~15:BW-1|x&112]^32)<33 /* no virgin R in corner G, */ ||b[G^1]|b[G^2]|b[FF=y+v-r]) /* no 2 empty sq. next to R */ )t+=flag&4; /* fake capt. for nonsliding*/ - else F=y; /* enable e.p. */ + else if(flag&64)t=flag&128?0:t,flag&=63;else F=y; /* enable e.p. */ if(s&&flag&8)t=0,flag^=flag>>4&15; /* hoppers go to next phase */ if(!(flag&S)) /* zig-zag piece? */ r=v,flag^=flag>>4&15; /* alternate vector & mode */