while(*p){X=*p>>8;Y=*p++;\r
printf(" %c%c%c%c",'a'+(X&15),'8'-(X>>4),'a'+(Y&15),'8'-(Y>>4&7));}\r
printf("\n");fflush(stdout);\r
- }
+ }\r
if(v>m) /* new best, update max,best*/\r
m=v,X=x,Y=y|S&F; /* mark non-double with S */\r
if(h){h=0;goto A;} /* redo after doing old best*/\r
break;\r
default:\r
b[m]=p+color+32; // assume non-virgin\r
- if(w[p]<0) { // Royal piece on original square: virgin
+ if(w[p]<0) { // Royal piece on original square: virgin\r
if(color==BLACK && m<0x10 && p==oo[m+16] ||\r
- color==WHITE && m>0x6F && p==oo[m-0x70]) b[m] -= 32;
- Q-=w[p]; // assume value was flipped to indicate royalty
- if(pl[p+color])R-=w[p]/FAC; // capturable King, add to material
- } else { Q+=w[p]; R+=w[p]/FAC; }
+ color==WHITE && m>0x6F && p==oo[m-0x70]) b[m] -= 32;\r
+ Q-=w[p]; // assume value was flipped to indicate royalty\r
+ if(pl[p+color])R-=w[p]/FAC; // capturable King, add to material\r
+ } else { Q+=w[p]; R+=w[p]/FAC; }\r
if((m==0x00 || m==BW-1 ) && color==BLACK && p==oo[m+16] ||\r
(m==0x70 || m==0x6F+BW) && color==WHITE && p==oo[m-0x70])\r
b[m] &= ~32; // corner piece as in original setup: virgin\r