Function inanis::engine::sort_next_move

source ·
pub fn sort_next_move(
    moves: &mut [MaybeUninit<Move>; 218],
    move_scores: &mut [MaybeUninit<i16>; 218],
    start_index: usize,
    moves_count: usize
) -> (Move, i16)
Expand description

Performs a selection sort on moves and move_scores arrays with the length specified in moves_count, starting from start_index. When it completes, the move and corresponding score will be under start_index - the function also explicitly returns both of them.