\r
InitGame()\r
{\r
- int i,j;\r
+ int i,j,k=0;\r
\r
+ Side = WHITE; Q=0; O=S;\r
+ Fifty = 0; R = 0;\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
if(w[oo[K]] == -1)pl[oo[K]]=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
- Fifty = 0; R = 0;\r
- for(i=0; i<BW; i++) if(i!=3) R += (w[oo[i]]/FAC) + (w[oo[i+16]]/FAC);\r
- UnderProm = -1; pl[WHITE] = pl[BLACK] = 2*BW;\r
+ for(i=0; i<BW; i++) {\r
+ R += abs(w[oo[i]])/FAC + abs(w[oo[i+16]])/FAC;\r
+ Q += abs(w[oo[i]]) - abs(w[oo[i+16]]) + w[1] - w[2];\r
+ if(w[oo[i]] < 0) k = w[oo[i]];\r
+ }\r
+ R -= 2*(-k/FAC);\r
+ UnderProm = -1; pl[WHITE] = pl[BLACK] = 2*BW; \r
pm = !pl[BLACK+7] && pl[BLACK+9] && pl[WHITE+7] ? 2 : 0; // Unlike white, black has no 'Q', so promote to 9, which he does have.\r
}\r
\r