lib/knuth.rb
# advance_random - retrieves a new batch of pseudorandom numbers.
# rubocop:disable Metrics/MethodLength
retrieves a new batch of pseudorandom numbers.
retrieves a new batch of pseudorandom numbers .
def advance_random
    (0..23).each do |index|
      new_random = @random_number_array[index] -
                   @random_number_array[index + 31]
      new_random += 1 if new_random < 0
      @random_number_array[index] = new_random
    end
    (24..54).each do |index|
      new_random = @random_number_array[index] -
                   @random_number_array[index - 24]
      new_random += 1 if new_random < 0
      @random_number_array[index] = new_random
    end
    nil
  end
def advance_random ( 0 .. 23 ) . each do | index | new_random = @random_number_array [ index ] - @random_number_array [ index + 31 ] new_random += 1 if new_random < 0 @random_number_array [ index ] = new_random end ( 24 .. 54 ) . each do | index | new_random = @random_number_array [ index ] - @random_number_array [ index - 24 ] new_random += 1 if new_random < 0 @random_number_array [ index ] = new_random end nil end
advance_random - retrieves a new batch of pseudorandom numbers.
advance_random - retrieves a new batch of pseudorandom numbers .