\r
Pieces with negative values are considered royal. If one side has more than\r
one royal piece of the same type, he loses if the _last_ one is captured.\r
+This means any 'spare' royal pieces can be sacrificed, and the exchange\r
+value assumed for them will be the absolute value of what you defined.\r
+With a value -1, however, loss of the first piece of that type loses the game.\r
For royal piece types larger than 7 there is the special rule that it is not\r
-allowed to leave more than one of them under attack. This means the 'spare'\r
-royal pieces can be sacrificed, and the exchange value assumed for them will\r
-be the absolute value of what you define for them.\r
+allowed to leave more than one of them under attack ('duple check').\r
\r
NOTE: piece value 181 for piece 7 is reserved for Makruk, and enables\r
promotion on the 6th rank. Do not use it in other variants.\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