```ruby
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 }
  end

  def valid_move?(input)
    valid_slots.include?(input - 1)
  end

  def whose_turn
    @turn == "X" ? "O" : "X"
  end

end```

Create a constant WIN_COMBOS as a nested array of all the possible ways to win in TTT
user
```ruby
class TicTacToe

  attr_accessor :board

  WIN_COMBOS = [[0,1,2],[3,4,5],[6,7,8],
                [0,3,6],[1,4,7],[2,5,8],
                [0,4,8],[2,4,6]]

  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 }
  end

  def valid_move?(input)
    valid_slots.include?(input - 1)
  end

  def whose_turn
    @turn == "X" ? "O" : "X"
  end

end```
assistant