if(flag&1+!t) /* mode (capt/nonc) allowed?*/\r
{if(t&&(t&16)==k)break; /* capture own */\r
i=w[t&15]+((t&192)>>sh); /* value of capt. piece t */\r
- if(i<0&&(pl[t&31]<2||kk!=H&kk!=S||(kk=H,i=-i,0)))m=I,d=98;/* K capture, duple check */\r
+ if(i<0&&(pl[t&31]<2|| /* K capture, (of last K), */\r
+ t>>3&kk!=H&kk!=S||(kk=H,i=-i,0)))m=I,d=98;/* or duple check: cutoff*/\r
if(m>=l&d>1)goto C; /* abort on fail high */\r
v=d-1?e:i-p; /*** MVV/LVA scoring if d=1**/\r
if(d-!t>1) /*** all captures if d=2 ***/\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
+ if(w[oo[K+16]+16] == -1)pl[oo[K+16]+16]=1;\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
break;\r
}\r
pl[BLACK+WHITE-color]++;pl[p+color]++;\r
+ if(w[p+color] == -1)pl[p+color]=1; // fake we have one if value = -1, to thwart extinction condition\r
continue;\r
}\r
}\r