input: Write a function to develop an AI Tic-Tac-Toe game using Python. The function should include a board-drawing function, a win-checking function, a function to determine the computer's move, and the main game-playing function.
  assert playGame() == None
  assert drawBoard(['-', 'X', 'O', 'X', 'O', 'X', 'O', 'X', 'O', 'X']) == None
  assert checkWin(['-', 'X', 'X', 'X', '-', '-', 'O', 'O', 'O'], 'O') == False
  assert getComputerSpot(['-', '-', '-', '-', '-', '-', '-', '-', '-', '-'], 'O') != None
output: def drawBoard(board):
      print(f"{board[0]} | {board[1]} | {board[2]}")
      print("--+---+--")
      print(f"{board[3]} | {board[4]} | {board[5]}")
      print("--+---+--")
      print(f"{board[6]} | {board[7]} | {board[8]}")
  
  def checkWin(board, player):
      win_patterns = [
          [0, 1, 2], [3, 4, 5], [6, 7, 8],  # rows
          [0, 3, 6], [1, 4, 7], [2, 5, 8],  # columns
          [0, 4, 8], [2, 4, 6]              # 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
      available_spots = [i for i, spot in enumerate(board) if spot == '-']
      return random.choice(available_spots)
  
  def playGame():
      board = ['-'] * 9
      players = ['X', 'O']
      current_player = 0
  
      while True:
          drawBoard(board)
          if current_player == 0:
              spot = int(input("Enter your move (0-8): "))
              if board[spot] == '-':
                  board[spot] = players[current_player]
              else:
                  print("Invalid move, try again.")
                  continue
          else:
              spot = getComputerSpot(board, players[current_player])
              board[spot] = players[current_player]
  
          if checkWin(board, players[current_player]):
              drawBoard(board)
              print(f"Player {players[current_player]} wins!")
              break
  
          if '-' not in board:
              drawBoard(board)
              print("It's a tie!")
              break
  
          current_player = 1 - current_player