search.rb
# Sorts moves by their assigned ordering scores
Sorts moves by their assigned ordering scores
Sorts moves by their assigned ordering scores
def sort_moves(i, n)
    i.upto(n - 1) do |j|
      best = j
      (j + 1).upto(n) { |k| best = k if @mv_score[@mv_idx[k]] > @mv_score[@mv_idx[best]] }
      unless best == j
        l = @mv_idx[j]
        @mv_idx[j] = @mv_idx[best]
        @mv_idx[best] = l
      end
    end
    nil
  end
def sort_moves ( i , n ) i . upto ( n - 1 ) do | j | best = j ( j + 1 ) . upto ( n ) { | k | best = k if @mv_score [ @mv_idx [ k ] ] > @mv_score [ @mv_idx [ best ] ] } unless best == j l = @mv_idx [ j ] @mv_idx [ j ] = @mv_idx [ best ] @mv_idx [ best ] = l end end nil end
Sorts moves by their assigned ordering scores
Sorts moves by their assigned ordering scores
i
<not_specific>
n
<not_specific>