X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=fairymax.c;fp=fairymax.c;h=470c03ad8a47d204f25ba5ae1b999675610a6975;hb=eaf83ea88d9567c38081aae39be668676edce3e2;hp=9b3adc7daa45ab1c569d85e6404248fc63459ed6;hpb=3f3fc8b97c2ae601d6d437647561be4d954a4fb8;p=fairymax.git diff --git a/fairymax.c b/fairymax.c index 9b3adc7..470c03a 100644 --- a/fairymax.c +++ b/fairymax.c @@ -266,14 +266,14 @@ int k,q,l,e,E,z,n; /* (q,l)=window, e=current eval. score, E=e.p. sqr.*/ J=f;Z=g; if(h){h=0;goto A;} /* redo after doing old best*/ } - s=t;v=r^flag>>12; /* capt & alternated vector */ + s=t&&2&~rg|~t&16^k;v=r^flag>>12; /* platform & toggled vector*/ if(flag&15^4|u&32|| /* no double or moved before*/ p>2&!(flag&S)&& /* no P & no virgin jump, */ ((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 if(flag&64)t=flag&128?0:t,flag&=63;else F=y; /* enable e.p. */ - if(s&&flag&8&&!(y-=rg*r,t=0) /* hoppers go to next phase */ + if(s&&flag&8&&!(y=rg&1?y-r:y,t=0) /* hoppers go to next phase */ ||!(flag&S)&&--rg<0) /* zig-zag piece? (w. delay)*/ r=v,flag^=flag>>4&15; /* alternate vector & mode */ }W(!t); /* if not capt. continue ray*/