main/players/player.rb
def create_number
    puts "Make your #{@type}, using four digits between 1-6; Ex: 1234"
    number = map_to_index(ask_number)
    check = validate_number(number)
    return number unless check

    puts check
    create_number
  end
# Make the request to the player for a number, sees if the format is right
# then returns that number, else it asks again until the number passes the check
Make the request to the player for a number, sees if the format is right
then returns that number, else it asks again until the number passes the check
Make the request to the player for a number sees if the format is right then returns that number else it asks again until the number passes the check
def create_number
    puts "Make your #{@type}, using four digits between 1-6; Ex: 1234"
    number = map_to_index(ask_number)
    check = validate_number(number)
    return number unless check
    puts check
    create_number
  end
def create_number puts "Make your #{@type}, using four digits between 1-6; Ex: 1234" number = map_to_index ( ask_number ) check = validate_number ( number ) return number unless check puts check create_number end
Make the request to the player for a number, sees if the format is right
then returns that number, else it asks again until the number passes the check
Make the request to the player for a number sees if the format is right then returns that number else it asks again until the number passes the check