<commit_before>class TicTacToe

  attr_accessor :board

  def initialize (turn = "X")
    @board = Array.new(9, " ")
    @turn = turn
  end

  def show_board
    puts " #{@board[0]} " + " #{@board[1]} " + " #{@board[2]} "
    puts " #{@board[3]} " + " #{@board[4]} " + " #{@board[5]} "
    puts " #{@board[6]} " + " #{@board[7]} " + " #{@board[8]} "
  end

  def move(idx_pos)
    @board[idx_pos - 1] = @turn
    @turn = whose_turn
  end

  def valid_slots
    @board.each_with_index.map{|symbol, index| index if symbol==" "}.reject{|slots| slots == nil }<commit_msg>Update #move method so that a move can only be made if it is made on a valid slot<commit_after>class TicTacToe

  attr_accessor :board

  def initialize (turn = "X")
    @board = Array.new(9, " ")
    @turn = turn
  end

  def show_board
    puts " #{@board[0]} " + " #{@board[1]} " + " #{@board[2]} "
    puts " #{@board[3]} " + " #{@board[4]} " + " #{@board[5]} "
    puts " #{@board[6]} " + " #{@board[7]} " + " #{@board[8]} "
  end

  def move(input)
    if valid_move?(input)
      @board[input - 1] = @turn
      @turn = whose_turn
    end
  end

  def valid_slots
    @board.each_with_index.map{|symbol, index| index if symbol==" "}.reject{|slots| slots == nil }
{'fraction_non_alphanumeric': 0.20711974110032363, 'fraction_numerical': 0.01779935275080906, 'mean_word_length': 3.0162337662337664, 'pattern_counts': {'":': 0, '<': 3, '<?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': '464919', 'n_tokens_mistral': 494, 'n_tokens_neox': 484, 'n_words': 113}