class Codebreaker::Codemaker

Constants

AMOUNT_OF_NUMBERS
RANGE_OF_NUMBERS

Attributes

secret_code[R]

Public Instance Methods

generate_secret_code(amout = AMOUNT_OF_NUMBERS, range = RANGE_OF_NUMBERS) click to toggle source
# File lib/codebreaker/codemaker.rb, line 10
def generate_secret_code(amout = AMOUNT_OF_NUMBERS, range = RANGE_OF_NUMBERS)
  array_of_numbers = []
  amout.times { array_of_numbers << rand(range) }
  @secret_code = array_of_numbers.join.to_i
end