A position where the side-to-be-mated has both K and CP is never
a check, and should thus not be allowed to occur in a tsume problem.
This was not properly detected. (Strictly speaking it can be a check
if both can be captured on the same move by a Lion/Falcon/Eagle,
but for now we ignore that.)
if( k == ABSENT) {\r
if((k = p[king + 2].pos) == ABSENT && (!tsume || tsume & stm+1))\r
return -INF; // lose when no King (in tsume only for side to be mated)\r
- } else if(p[king + 2].pos != ABSENT) k = ABSENT; // two kings is no king...\r
+ } else if(p[king + 2].pos != ABSENT) {\r
+ if(tsume && tsume & stm+1) {\r
+ retDep = 60; return INF; // we win when not in check\r
+ }\r
+ k = ABSENT; // two kings is no king...\r
+ }\r
if( k != ABSENT) { // check is possible\r
if(!attacks[2*k + xstm]) {\r
if(tsume && tsume & stm+1) {\r