{v=centr[p]?b[x+257]-b[y+257]:0; /* center positional pts. */\r
if(!(G&S))b[FF]=b[G],v+=50; /* castling: put R & score */\r
b[G]=b[H]=b[x]=0;b[y]=u|32; /* do move, set non-virgin */\r
+ pl[t&31]-=!!t; /* updat victim piece count */\r
v-=w[p]>0|R<EG?0:20; /*** freeze K in mid-game ***/\r
if(p<3) /* pawns: */\r
{v-=9*((x-2&M||b[x-2]-u)+ /* structure, undefended */\r
v=m; /* (prevent fail-lows on */\r
} /* K-capt. replies) */\r
J=f;Z=g;\r
- SHAMAX( pl[k]+=!!t; )\r
+ SHAMAX( pl[k]+=!!t; ) pl[t&31]+=!!t;\r
b[G]=b[FF];b[FF]=b[y]=0;b[x]=u;b[H]=t; /* undo move,G can be dummy */\r
} /* if non-castling */\r
if(z&S&&Post&K==I&d>2&v>V&v<l){int *p=ps;char X,Y;\r
int i,j;\r
\r
for(i=0;i<16*BH;i++)b[i]=0;\r
+ for(i=0;i<32;i++)pl[i]=0;\r
K=BW;W(K--)\r
{b[K]=oo[K+16]+16;b[K+112]=oo[K];b[K+16]=18;b[K+96]=1; /* initial board setup*/\r
+ pl[oo[K+16]+16]++;pl[oo[K]]++;pl[18]++;pl[1]++;\r
L=8;W(L--)b[16*L+K+257]=(K-BW/2)*(K-BW/2)+(L-3.5)*(L-3.5); /* center-pts table */\r
} /*(in unused half b[])*/\r
Side = WHITE; Q=0; O=S;\r
if(m=='.') break;\r
if(m=='#') {\r
for(i=0; i<128; i++) b[i]=0;\r
+ for(i=0; i<32; i++) pl[i]=0;\r
Q=0; R=0; O=S;\r
pl[WHITE]=pl[BLACK]=0;\r
continue;\r
case 0: // undefined piece, ignore\r
break;\r
}\r
- pl[BLACK+WHITE-color]++;\r
+ pl[BLACK+WHITE-color]++;pl[p+color]++;\r
continue;\r
}\r
}\r