title: buidling Tic Tac Toe, Why my method is not working?
body: <p>I am trying to build a Tic Tac Toe, the method <code>valid_move?</code> suppose to make sure the submitted position is: </p>
  
  <ol>
  <li>Present on the game board. </li>
  <li>Not already filled with a token.</li>
  </ol>
  
  <p>So I first tried to make sure the position is between 1-9 on the board, and second tried to make sure the position is not taken, here i just use a <strong>helper method</strong> <code>position_taken?</code> but seems something is wrong and my <code>valid_move?</code> is not working....</p>
  
  <pre><code>def valid_move?(board,position)
    if  position.to_i.between?(1,9) &amp;&amp; position_taken?
      true
    else
       false
    end
  end
  
  
  
  def position_taken?(board,position)
    if board[position] == " "
      false
      elsif board[position] == ""
      false
      elsif  board[position] == nil
      false
      else   board[position] == "X" || "O"
      true
  
    end
  end
  </code></pre>
  
  <p>basically im trying to pass below spec:</p>
  
  <pre><code>  it 'returns true for a valid position on an empty board' do
      board = [" ", " ", " ", " ", " ", " ", " ", " ", " "]
      position = "1"
      expect(valid_move?(board, position)).to be_truthy
    end
  
    it 'returns nil or false for an occupied position' do
      board = [" ", " ", " ", " ", "X", " ", " ", " ", " "]
      position = "5"
  
      expect(valid_move?(board, position)).to be_falsey
    end
  
    it 'returns nil or false for a position that is not on the board' do 
      board = [" ", " ", " ", " ", " ", " ", " ", " ", " "]
      position = 100
  
      expect(valid_move?(board, position)).to be_falsey
    end
  
  end
  </code></pre>