endBadCaptures = moves + MAX_MOVES - 1;
ss = s;
- if (p.in_check())
+ if (p.checkers())
phase = EVASION;
else
killers[1].move = ss->killers[1];
// Consider sligtly negative captures as good if at low depth and far from beta
- if (ss && ss->eval < beta - PawnValueMg && d < 3 * ONE_PLY)
+ if (ss && ss->staticEval < beta - PawnValueMg && d < 3 * ONE_PLY)
captureThreshold = -PawnValueMg;
// Consider negative captures as good if still enough to reach beta
- else if (ss && ss->eval > beta)
- captureThreshold = beta - ss->eval;
+ else if (ss && ss->staticEval > beta)
+ captureThreshold = beta - ss->staticEval;
}
ttMove = (ttm && pos.is_pseudo_legal(ttm) ? ttm : MOVE_NONE);
assert(d <= DEPTH_ZERO);
- if (p.in_check())
+ if (p.checkers())
phase = EVASION;
else if (d > DEPTH_QS_NO_CHECKS)
MovePicker::MovePicker(const Position& p, Move ttm, const History& h, PieceType pt)
: pos(p), H(h), cur(moves), end(moves) {
- assert(!pos.in_check());
+ assert(!pos.checkers());
phase = PROBCUT;