input: Write a function to create an AI-based Tic-Tac-Toe game in Python. The function should include methods to draw the board, check for winning conditions, and determine the computer's move. The game should be able to handle both human and computer moves and determine the win or draw status.
  assert playGame()==None
  assert checkWin(['-', 'X', 'X', 'X', 'O', 'O', '-', '-', '-', '-'], 'X')==True
  assert checkWin(['-', 'X', 'O', 'X', 'O', 'O', 'X', '-', '-', '-'], 'O')==True
  assert getComputerSpot(['-' for x in range(10)],'O')==random.choice([i for i, spot in enumerate(['-' for x in range(10)]) if spot == '-'])
output: def playGame():
      pass
  
  def checkWin(board, player):
      win_patterns = [
          [1, 2, 3], [4, 5, 6], [7, 8, 9],  # rows
          [1, 4, 7], [2, 5, 8], [3, 6, 9],  # columns
          [1, 5, 9], [3, 5, 7]              # diagonals
      ]
      for pattern in win_patterns:
          if all(board[i] == player for i in pattern):
              return True
      return False
  
  def getComputerSpot(board, player):
      import random
      return random.choice([i for i, spot in enumerate(board) if spot == '-'])