<commit_before>class Sudoku
  attr_accessor :board

  def initialize(board_string)
    @board = board_string.split('').each_slice(9).to_a
  end

  def solve(board_string)
  end

  def solved?(board)
  end

  def pretty_board(board)
  end

  def board_to_string(board)
  end

  # Loops through 1-9 and returns an array of possible numbers for that cell
  def possible_numbers_for_cell(i,j)
    return [] if @board[i,j] == '-'
    possible_numbers = []
    (1..9).each do |x|
      subsquare = is_possible_in_subsquare(i,j,num)
      row = is_possible_in_row(i,j,num)
      column = is_possible_in_column(i,j,num)
      possible_numbers << x if subsquare && row && column
    end
    possible_numbers
  end

  # Takes the gameboard and determines whether the number is possible in the grid
  def is_possible_in_subsquare(i,j,num)<commit_msg>Fix merge conflicts and update solve<commit_after>class Sudoku
  attr_accessor :board

  def initialize(board_string)
    @board = board_string.split('').each_slice(9).to_a
  end

  def solve(board_string)
    loop do
      num_filled_in = 0
      board.each_with_index do |row, j|
        row.each_with_index do |cell, i|
          possible_numbers = possible_numbers_for_cell(i, j)
          if possible_numbers.length == 1
            board[j][i] = possible_numbers[0]
          end
        end
      end
      break if num_filled_in == 0 || solved?
    end
  end

  def solved?
    !board.flatten.include?('-')
  end

  def pretty_board(board)
  end

  def board_to_string(board)
  end

  # Loops through 1-9 and returns an array of possible numbers for that cell
  def possible_numbers_for_cell(i,j)
    return [] if @board[i,j] == '-'
    possible_numbers = []
    (1..9).each do |x|
      subsquare = is_possible_in_subsquare(i,j,num)
      row = is_possible_in_row(i,j,num)
      column = is_possible_in_column(i,j,num)
      possible_numbers << x if subsquare && row && column
    end
    possible_numbers
  end

  # Takes the gameboard and determines whether the number is possible in the grid
  def is_possible_in_subsquare(i,j,num)
{'fraction_non_alphanumeric': 0.09173871277617675, 'fraction_numerical': 0.0067243035542747355, 'mean_word_length': 3.132936507936508, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1481610', 'n_tokens_mistral': 730, 'n_tokens_neox': 698, 'n_words': 180}