// to search the moves. Because the depth is <= 0 here, only captures,
// queen promotions and checks (only if depth == 0) will be generated.
MovePicker mp = MovePicker(pos, false, MOVE_NONE, MOVE_NONE, MOVE_NONE,
- MOVE_NONE, depth);
+ MOVE_NONE, depth, &ei);
Move move;
int moveCount = 0;
Bitboard dcCandidates = mp.discovered_check_candidates();
// ok_to_history() returns true if a move m can be stored
- // in history. Should be a non capturing move.
+ // in history. Should be a non capturing move nor a promotion.
bool ok_to_history(const Position& pos, Move m) {
- return pos.square_is_empty(move_to(m))
- && !move_promotion(m)
- && !move_is_ep(m);
+ return !pos.move_is_capture(m) && !move_promotion(m);
}