order_all_moves

Function order_all_moves 

Source
pub fn order_all_moves(
    legal_moves: MoveInfoList,
    maybe_key_move: Option<Move>,
) -> MoveInfoList
Expand description

Order all moves in a container completely, in order of worst move to best move. Best moves are near the end to allow for iterating from best to worst move by using while let Some(move_) = move_list.pop() ... or for move_ in move_list.into_iter().rev() ...

ยงArguments

  • legal_moves: List of MoveInfos for all legal moves of current position.
  • maybe_key_move: Transposition Table move for current position.