fn razoring_can_be_applied<const PV: bool>(
    depth: i8,
    alpha: i16,
    friendly_king_checked: bool
) -> bool
Expand description

The main idea of the razoring is to detect and prune all nodes, which (based on lazy evaluation) are hopeless compared to the current alpha and the chance to improve the score is too small to spend time here. To make it more safe and not to skip positions where we’re somewhere in the middle of capture sequence, there’s the quiescence search performed to verify if the final score is still below alpha - margin.

Conditions: