It is always used as a bool, so let's make it a bool straight away.
We can always redefine it as a Piece in a later patch if we want
to use the piece type or the piece color.
No functional change.
Move ttMove, move, excludedMove, bestMove;
Depth extension, newDepth;
Value bestValue, value, ttValue, eval, maxValue;
Move ttMove, move, excludedMove, bestMove;
Depth extension, newDepth;
Value bestValue, value, ttValue, eval, maxValue;
- bool ttHit, ttPv, inCheck, givesCheck, improving, doLMR;
+ bool ttHit, ttPv, inCheck, givesCheck, improving, doLMR, priorCapture;
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, ttCapture;
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, ttCapture;
- Piece movedPiece, priorCapture;
int moveCount, captureCount, quietCount, singularLMR;
// Step 1. Initialize node
int moveCount, captureCount, quietCount, singularLMR;
// Step 1. Initialize node
probCutCount++;
ss->currentMove = move;
probCutCount++;
ss->currentMove = move;
- ss->continuationHistory = &thisThread->continuationHistory[!!priorCapture][pos.moved_piece(move)][to_sq(move)];
+ ss->continuationHistory = &thisThread->continuationHistory[priorCapture][pos.moved_piece(move)][to_sq(move)];
// Update the current move (this must be done after singular extension search)
ss->currentMove = move;
// Update the current move (this must be done after singular extension search)
ss->currentMove = move;
- ss->continuationHistory = &thisThread->continuationHistory[!!priorCapture][movedPiece][to_sq(move)];
+ ss->continuationHistory = &thisThread->continuationHistory[priorCapture][movedPiece][to_sq(move)];
// Step 15. Make the move
pos.do_move(move, st, givesCheck);
// Step 15. Make the move
pos.do_move(move, st, givesCheck);
Move ttMove, move, bestMove;
Depth ttDepth;
Value bestValue, value, ttValue, futilityValue, futilityBase, oldAlpha;
Move ttMove, move, bestMove;
Depth ttDepth;
Value bestValue, value, ttValue, futilityValue, futilityBase, oldAlpha;
- Piece priorCapture;
- bool ttHit, pvHit, inCheck, givesCheck, evasionPrunable;
+ bool ttHit, pvHit, inCheck, givesCheck, evasionPrunable, priorCapture;
int moveCount;
if (PvNode)
int moveCount;
if (PvNode)
}
ss->currentMove = move;
}
ss->currentMove = move;
- ss->continuationHistory = &thisThread->continuationHistory[!!priorCapture][pos.moved_piece(move)][to_sq(move)];
+ ss->continuationHistory = &thisThread->continuationHistory[priorCapture][pos.moved_piece(move)][to_sq(move)];
// Make and search the move
pos.do_move(move, st, givesCheck);
// Make and search the move
pos.do_move(move, st, givesCheck);