}\r
#endif\r
\r
+int flag;\r
+\r
inline int\r
NewNonCapture (int x, int y, int promoFlags)\r
{\r
if(board[y] != EMPTY) return 1; // edge, capture or own piece\r
+//if(flag) printf("# add %c%d%c%d, pf=%d\n", x%BW+'a',x/BW,y%BW+'a',y/BW, promoFlags);\r
if( (promoBoard[x] | promoBoard[y]) & promoFlags) { // piece can promote with this move\r
moveStack[msp++] = moveStack[nonCapts]; // create space for promotion\r
moveStack[nonCapts++] = x<<SQLEN | y | PROMOTE; // push promotion\r
}\r
} else\r
moveStack[msp++] = x<<SQLEN | y; // push normal move\r
+//if(flag) printf("msp=%d nc=%d\n", msp, nonCapts); \r
return 0;\r
}\r
\r
return 0;\r
}\r
\r
-int flag;\r
-\r
int\r
Search (int alpha, int beta, int difEval, int depth, int oldPromo, int promoSuppress)\r
{\r
if(i>=retMSP) { // no exact match\r
if(deferred) { // but maybe non-sensical deferral\r
int flags = p[board[f]].promoFlag;\r
+printf("# deferral of %d\n", deferred);\r
i = deferred; // in any case we take that move\r
if(!(flags & promoBoard[t] & (CANT_DEFER | LAST_RANK))) { // but change it into a deferral if that is allowed\r
moveStack[i] &= ~PROMOTE;\r