Modules
Constants
Functions
- Checks if
score
is within mate range (from -CHECKMATE_SCORE to -CHECKMATE_SCORE + MAX_DEPTH and from CHECKMATE_SCORE - MAX_DEPTH to CHECKMATE_SCORE). - Performs a selection sort on
moves
andmove_scores
arrays with the length specified inmoves_count
, starting fromstart_index
. When it completes, the move and corresponding score will be understart_index
- the function also explicitly returns both of them.