input: Write a function to develop an AI Tic-Tac-Toe game using Python. The function should include methods to print the board, check for a win, determine the computer's move, and manage the game flow. If the game results in a win, the function should print the board and declare the winner. If the game results in a draw, the function should print the board and declare the draw.
  
  assert playGame() == None
  assert drawBoard(['-', 'X', 'O', 'X', 'O', 'X', 'O', 'X', 'O', 'X']) == None
  assert checkWin(['-', 'X', 'X', 'X', 'O', 'O', '-', '-', '-', '-'], 'X') == True
  assert getComputerSpot(['-', 'X', 'O', 'X', 'O', 'X', 'O', 'X', 'O', 'X'], 'O') == None
output: def playGame():
      board = ['-'] * 9
      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), (0, 3, 6), (1, 4, 7), (2, 5, 8), (0, 4, 8), (2, 4, 6)]
          for pattern in win_patterns:
              if board[pattern[0]] == board[pattern[1]] == board[pattern[2]] == player:
                  return True
          return False
  
      def getComputerSpot(board, player):
          import random
          available_spots = [i for i in range(9) if board[i] == '-']
          return random.choice(available_spots) if available_spots else None
  
      def gameFlow():
          current_player = 'X'
          for _ in range(9):
              drawBoard(board)
              if current_player == 'X':
                  spot = int(input("Enter your move (0-8): "))
              else:
                  spot = getComputerSpot(board, 'O')
              board[spot] = current_player
              if checkWin(board, current_player):
                  drawBoard(board)
                  print(f"{current_player} wins!")
                  return
              current_player = 'O' if current_player == 'X' else 'X'
          drawBoard(board)
          print("It's a draw!")
  
      gameFlow()