#include <stdlib.h>
#include <string.h>
+#define DEBUG 0
+
#define LMR 2
#define ON 1
// legality
int earlyGen = (ff->toPiece == stm+31); // King was moved
-if(ply > 90) Dump("maxply");
+ if(ply > 90) { if(DEBUG) Dump("maxply"); ff->depth = 0; return -ff->newEval+150; }
f.xking = location[stm+31]; // opponent King, as stm not yet toggled
if(!earlyGen && ff->mutation > 0) { // if other piece was moved (not dropped!), abort with +INF score if it was pinned
if(Pinned(stm, ff->fromSqr, f.xking)) return INF;
}
}
hashMove = entry->move;
-if(hashMove && board[hashMove>>8&255] == 0) {char s[100];sprintf(s,"bad hash move %16llx: %s\n", f.hashKey, MoveToText(hashMove)); Dump(s); }
hit = 1;
p = board[hashMove>>8&255];
if(hashMove && ((p & stm) == 0 || p == -1)) {
+ if(DEBUG) printf("telluser bad hash move %16llx: %s\n", f.hashKey, MoveToText(hashMove));
hashMove = 0; f.checker = CK_UNKNOWN;
}
} else hit = hashMove = 0, f.checker = CK_UNKNOWN;
// move generation
if(!earlyGen) { // generate moves if we had not done so yet
if(MoveGen(stm, &m, f.rights)) { // impossible (except for hash collision giving wrong in-check status)
- Dump("King capture");
+ if(DEBUG) Dump("King capture"); ff->depth = MAXPLY; moveSP = oldSP; return INF;
}
if(f.checkDist && maxDepth <= 1) ipMask = SafeIP(&f);
}