#define EMPTY 0\r
#define EDGE (1<<11)\r
#define TYPE (WHITE|BLACK|EDGE)\r
-#define ABSENT 4095\r
+#define ABSENT 2047\r
#define INF 8000\r
#define NPIECES 2000 /* length of piece list */\r
\r
break;\r
case 7: // bad captures\r
case 8: // PV null move\r
+ phase = 9;\r
+ if(nullMove != ABSENT) {\r
+ moveStack[msp++] = nullMove + (nullMove << SQLEN) | DEFER; // kludge: setting DEFER guarantees != 0, and has no effect\r
+ }\r
+printf("# %d. sqr = %08x null = %08x\n", msp, nullMove, moveStack[msp-1]);\r
case 9:\r
goto cutoff;\r
}\r
{\r
static char buf[50];\r
int f = move>>SQLEN & SQUARE, g = f, t = move & SQUARE;\r
+ if(f == t) { sprintf(buf, "@@@@"); return buf; } // null-move notation in WB protocol\r
buf[0] = '\0';\r
if(t >= SPECIAL) { // kludgy! Print as side effect non-standard WB command to remove victims from double-capture (breaks hint command!)\r
int e = f + epList[t - SPECIAL];\r
ParseMove (char *moveText)\r
{\r
int i, j, f, t, t2, e, ret, deferred=0;\r
+ char c = moveText[0];\r
moveText += ReadSquare(moveText, &f);\r
moveText += ReadSquare(moveText, &t); t2 = t;\r
if(*moveText == ',') {\r
}\r
ret = f<<SQLEN | t2;\r
if(*moveText == '+') ret |= PROMOTE;\r
+printf("# suppress = %c%d\n", sup1%BW+'a', sup1/BW);\r
MapFromScratch(attacks);\r
Search(-INF-1, INF+1, 0, 1, sup1, sup2);\r
for(i=retFirst; i<retMSP; i++) {\r
+ if(moveStack[i] == INVALID) continue;\r
+ if(c == '@' && (moveStack[i] & SQUARE) == (moveStack[i] >> SQLEN & SQUARE)) break; // any null move matches @@@@\r
if((moveStack[i] & (PROMOTE | DEFER-1)) == ret) break;\r
if((moveStack[i] & DEFER-1) == ret) deferred = i; // promoted version of entered non-promotion is legal\r
}\r