// Expensive mate threat detection (only for PV nodes)
if (PvNode)
- mateThreat = pos.has_mate_threat(opposite_color(pos.side_to_move()));
+ mateThreat = pos.has_mate_threat();
// Initialize a MovePicker object for the current position
MovePicker mp = MovePicker(pos, ttMove, depth, H, ss, (PvNode ? -VALUE_INFINITE : beta));
if ( m != MOVE_NULL
&& before != VALUE_NONE
&& after != VALUE_NONE
- && pos.captured_piece() == NO_PIECE_TYPE
+ && pos.captured_piece_type() == PIECE_TYPE_NONE
&& !move_is_special(m))
H.set_gain(pos.piece_on(move_to(m)), move_to(m), -(before + after));
}