const uint8_t QsearchWithoutChecksTable[] = { PH_TT_MOVES, PH_QCAPTURES, PH_STOP };
}
+bool MovePicker::isBadCapture() const { return phase == PH_BAD_CAPTURES; }
/// Constructor for the MovePicker class. Apart from the position for which
/// it is asked to pick legal moves, MovePicker also wants some information
// Skip TT move if is not a capture or a promotion, this avoids
// qsearch tree explosion due to a possible perpetual check or
// similar rare cases when TT table is full.
- if (ttm != MOVE_NONE && !pos.move_is_capture_or_promotion(ttm))
+ if (ttm != MOVE_NONE && !pos.move_is_capture(ttm) && !move_is_promotion(ttm))
searchTT = ttMoves[0].move = MOVE_NONE;
}
case PH_TT_MOVES:
move = (curMove++)->move;
if ( move != MOVE_NONE
- && pos.move_is_legal(move, pinned))
+ && pos.move_is_pl(move)
+ && pos.pl_move_is_legal(move, pinned))
return move;
break;
case PH_KILLERS:
move = (curMove++)->move;
if ( move != MOVE_NONE
- && pos.move_is_legal(move, pinned)
+ && pos.move_is_pl(move)
+ && pos.pl_move_is_legal(move, pinned)
&& move != ttMoves[0].move
&& move != ttMoves[1].move
&& !pos.move_is_capture(move))