} PieceDesc;\r
\r
typedef struct {\r
- int from, to, piece, victim, new, booty, epSquare, epVictim, ep2Square, ep2Victim;\r
+ int from, to, piece, victim, new, booty, epSquare, epVictim, ep2Square, ep2Victim, savKeyL, savKeyH;\r
} UndoInfo;\r
\r
int stm, xstm, hashKeyH, hashKeyL, framePtr, msp, nonCapts, retMSP, retFirst, level, chuFlag=1;\r
u->piece = board[u->from];\r
board[u->from] = EMPTY;\r
u->booty = 0;\r
+ u->savKeyL = hashKeyL;\r
+ u->savKeyH = hashKeyH;\r
\r
if(m & (PROMOTE | DEFER)) {\r
if(m & DEFER) {\r
p[u->new].pos = ABSENT; \r
p[u->piece].pos = u->from; // this can be the same as above\r
board[u->from] = u->piece;\r
+\r
+ hashKeyL = u->savKeyL;\r
+ hashKeyH = u->savKeyH;\r
}\r
\r
void\r
Search (int alpha, int beta, int difEval, int depth, int oldPromo, int promoSuppress)\r
{\r
int i, j, k, firstMove, oldMSP = msp, curMove, sorted, bad, phase, king, iterDep, replyDep, nextVictim, to, defer, dubious, bestMoveNr;\r
- int savHashL = hashKeyL, savHashH = hashKeyH;\r
int score, bestScore, curEval, iterAlpha;\r
Move move, nullMove;\r
UndoInfo tb;\r
attacks -= 2*BSIZE;\r
level--;\r
UnMake(&tb);\r
- hashKeyL = savHashL;\r
- hashKeyH = savHashH;\r
xstm = stm; stm ^= WHITE;\r
#if 1\r
if(PATH) printf("%d:%2d:%d %3d %6x %-10s %6d %6d\n", level, depth, iterDep, curMove, moveStack[curMove], MoveToText(moveStack[curMove], 0), score, bestScore);\r