add taken spaces function for tictactoe