<commit_before><commit_msg>Start creating code to compare guesses<commit_after>@code = 'BYYY'

@guess = 'RGGG'

def match?
  @code == @guess
end

def number_of_colors
  result = @code.split('').map do |x|
    @guess[x] == @code[x]
  end
end

def white_pegs
  number_of_colors.count(true)
end

def correct_position
  result = []
  x = 0
  4.times do
    result << @code[x].match(@guess[x])
    x += 1
  end
  result
end

def black_pegs
  4 - correct_position.count(nil)
end



match?

number_of_colors

white_pegs

correct_position

black_pegs



{'fraction_non_alphanumeric': 0.11559633027522936, 'fraction_numerical': 0.007339449541284404, 'mean_word_length': 3.6271186440677967, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6115573', 'n_tokens_mistral': 223, 'n_tokens_neox': 218, 'n_words': 52}