int\r
Search (int alpha, int beta, int difEval, int depth, int lmr, int oldPromo, int promoSuppress, int threshold)\r
{\r
- int i, j, k, phase, king, nextVictim, to, defer, autoFail=0, inCheck = 0, late=100000;\r
+ int i, j, k, phase, king, nextVictim, to, defer, autoFail=0, inCheck = 0, late=100000, ep;\r
int firstMove, oldMSP = msp, curMove, sorted, bad, dubious, bestMoveNr;\r
int resDep, iterDep, ext;\r
int myPV = pvPtr;\r
autoFail = 0; curMove = firstMove - 1; continue; // release stashed moves for search\r
}\r
phase = 4; // out of victims: all captures generated\r
- if(chessFlag && promoSuppress != ABSENT) { // e.p. rights. Create e.p. captures as Lion moves\r
- int n = board[promoSuppress-1], old = msp; // a-side neighbor of pushed pawn\r
- if( n != EMPTY && (n&TYPE) == stm && p[n].value == pVal ) NewCapture(promoSuppress-1, SPECIAL + 20 - 4*stm, 0);\r
- n = board[promoSuppress+1]; // h-side neighbor of pushed pawn\r
- if( n != EMPTY && (n&TYPE) == stm && p[n].value == pVal ) NewCapture(promoSuppress+1, SPECIAL + 52 - 4*stm, 0);\r
+ if(chessFlag && (ep = promoSuppress & SQUARE) != ABSENT) { // e.p. rights. Create e.p. captures as Lion moves\r
+ int n = board[ep-1], old = msp; // a-side neighbor of pushed pawn\r
+ if( n != EMPTY && (n&TYPE) == stm && p[n].value == pVal ) NewCapture(ep-1, SPECIAL + 20 - 4*stm, 0);\r
+ n = board[ep+1]; // h-side neighbor of pushed pawn\r
+ if( n != EMPTY && (n&TYPE) == stm && p[n].value == pVal ) NewCapture(ep+1, SPECIAL + 52 - 4*stm, 0);\r
if(msp != old) goto extractMove; // one or more e.p. capture were generated\r
}\r
case 4: // dubious captures\r