input: Write a function to implement an AI Tic-Tac-Toe game using Python. The function should include a board representation, a method to check for a winning condition, and a method for the AI to choose its move. Finally, it should allow a human player to play against the AI.
  assert playGame()==None
  assert checkWin(['-', 'X', 'X', 'X', '-', '-', '-', '-', '-', '-'], 'X')==True
  assert checkWin(['-', '-', '-', '-', 'O', 'O', 'O', '-', '-', '-'], 'O')==True
  assert checkWin(['-', '-', '-', '-', '-', 'X', 'X', '-', '-', 'X'], 'X')==False
  assert getComputerSpot(['-', 'X', '-', '-', '-', '-', '-', '-', '-', '-'], 'O') in [3, 4, 5, 6, 7, 8, 9]
  assert getComputerSpot(['-', 'X', 'O', 'X', 'O', 'X', 'O', 'X', 'O', '-'], 'O')==9
output: def playGame():
      board = ['-'] * 10
      def checkWin(board, player):
          win_conditions = [(1, 2, 3), (4, 5, 6), (7, 8, 9), (1, 4, 7), (2, 5, 8), (3, 6, 9), (1, 5, 9), (3, 5, 7)]
          for condition in win_conditions:
              if board[condition[0]] == board[condition[1]] == board[condition[2]] == player:
                  return True
          return False
  
      def getComputerSpot(board, player):
          import random
          available_spots = [i for i in range(1, 10) if board[i] == '-']
          return random.choice(available_spots)
  
      while True:
          human_spot = int(input("Enter your move (1-9): "))
          if board[human_spot] == '-':
              board[human_spot] = 'X'
              if checkWin(board, 'X'):
                  print("You win!")
                  break
              if '-' not in board[1:]:
                  print("It's a draw!")
                  break
              computer_spot = getComputerSpot(board, 'O')
              board[computer_spot] = 'O'
              if checkWin(board, 'O'):
                  print("Computer wins!")
                  break
          else:
              print("Invalid move, try again.")