This is the Codebreaker game in Ruby.  Tell me what I can make better!#!/usr/bin/env rubyclass Sequence  attr_accessor :guess, :code  def initialize    puts Type the difficulty level you would like: 1, 2, 3, 4, or 5    begin      @level = gets; @level = @level.to_i      if @level > 6        raise Error      end    rescue      puts Invalid Difficulty      exit    end  end  def create_code    @code = #{rand(@level*2)}#{rand(@level*2)}#{rand(@level*2)}#{rand(@level*2)}    if @level == 5      @code += #{rand(@level*2)}    end    if @code.length > 5      puts Invalid Difficulty!      exit    end    puts @code  end  def prompt    @retstring =     @guess =     guesses = 0    while guesses < 4      print Enter a guess:       @guess = gets      x = 0      4.times do        if @code[x] == @guess[x]          @retstring += +        else          @retstring += -        end        puts @retstring        sleep(1)        x += 1      end      puts Would you like a hint? Type 'hint' to get a hint      hint = gets      match = hint =~ /(h|H)(i|I)(n|N)\w/      unless match == nil        j = rand(@level*2)        puts #{j}: #{@code[j]}      end      guesses += 1      if @retstring == ++++        puts Correct!        break      end      @retstring =     end  end  def print_code    print @code    print  was the code\n  endendj = Sequence.newj.create_codej.promptj.print_code
Codebreaker game
ruby;game