<commit_before>class Mastermind
  def initialize
  end

  def clear
    print "\e[2J\e[f"
  end

  def run
    clear
    puts 'Welcome to MASTERMIND'
    puts 'Would you like to (p)lay, read the (i)nstructions, or (q)uit?'
    command = ''
    while command != 'q'
      printf '> '
      input = gets.chomp
      parts = input.split(' ')
      command = parts[0]
      case command
      when 'q'
        puts 'Goodbye!'
      when 'i'
        #print instructions
      when 'p'
        #play the game
      else
        puts "Sorry, I don't know how to #{command}"
      end
    end
  end

end

mastermind = Mastermind.new

mastermind.run<commit_msg>Modify REPL input/output<commit_after>class Mastermind
  def initialize
  end

  def clear
    print "\e[2J\e[f"
  end

  def run
    clear
    puts 'Welcome to MASTERMIND'
    puts 'Would you like to (p)lay, read the (i)nstructions, or (q)uit?'
    command = ''
    while command != 'q'
      printf '> '
      command = gets.chomp[0]
      case command
      when 'q'
        puts 'Goodbye!'
      when 'i'
        puts 'print instructions'
      when 'p'
        puts 'play the game'
      else
        puts "Command #{command} not valid"
      end
    end
  end
end

mastermind = Mastermind.new

mastermind.run
{'fraction_non_alphanumeric': 0.09636650868878358, 'fraction_numerical': 0.00315955766192733, 'mean_word_length': 1.9741784037558685, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5497629', 'n_tokens_mistral': 425, 'n_tokens_neox': 427, 'n_words': 136}