X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=fairymax.c;h=b5f0545074330acc7f8ee11ddba50f005530c838;hb=7e24a85634e1c87710ad177419830f3ecafee7de;hp=b236e4d54bb18ab4d20c1f49ad0c2cfd7c372e4e;hpb=319c6cd9990e350a23689b30053b25660c2c3d8f;p=fairymax.git diff --git a/fairymax.c b/fairymax.c index b236e4d..b5f0545 100644 --- a/fairymax.c +++ b/fairymax.c @@ -219,7 +219,7 @@ int k,q,l,e,ev,E,z,n; /* (q,l)=window, e=current eval. score, E=e.p. sqr.*/ re=v>>Fac(v>>15&16^k); /* Reduce eval if drawish for leading side */ if(z&S)V=m-margin>q?m-margin:q; /* multiPV */ C=d-1-(d>5&p>2&!t&!h); /* nw depth, reduce non-cpt.*/ - C=R0?C:d; /* extend 1 ply if in-check */ do s=C>2|re>V?-D(16-k,-l,-V,/*** futility, recursive eval. of reply */ -v,-re,F,y&255,C):re; @@ -300,7 +300,7 @@ Fac(int k) h=pl[k]-pl[17-k]-pl[18-k]; /* his pieces (incl. King) */ if(h<2)r=0; /* bare K easy even w.o. P */ j=h-n; /* defenders after sac for P*/ - if(j<3&&j--){ /* can sac, <= 1 piece left */ + if(j<3&&j-->0){ /* can sac, <= 1 piece left */ i=18-k;W(!pl[++i]); /* get lowest piece */ e=abs(w[i--])*n; /* sac for Pawn (if any) */ W(h>1)h-=pl[++i],e-=pl[i]*w[i]; /* total value his remaining*/