{ od[++i]=j; centr[i] = c>='a';\r
blacktype[c&31]=i; piecename[i]=c&31;\r
if(piecetype[c&31]==0) piecetype[c&31]=i; // only first\r
+ pb[i] = pb[i+16] = w[i]>>3 & ~3; // pair bonus, for now 1/8 of piece value, leave low bits for flag\r
succession |= w[i] < -4; // expendable royalty; assume we can promote to it\r
} else {\r
- if(!o[j]) pb[i] = pb[i+16] = of[j--]; // hand-set pair bonus\r
+ if((o[j]^o[j]+8>>4)&1 || of[j]>>4) pb[i] = pb[i+16] = 0; // not color bound (or too complex to see it), so no pair bonus\r
+ if(!o[j]) pb[i] = pb[i+16] = of[j--]; // hand-set pair bonus kludges: 3 for mating minor, negative for non-mating pair.\r
}\r
j++; o[j]=0;\r
/* printf("# c='%c' i=%d od[i]=%d j=%d (%3d,%8x)\n",c?c:' ',i,od[i],j,o[j-1],of[j-1]); /**/\r