input: Write a function to develop an AI Tic-Tac-Toe game using Python. The function should include a board drawing function, a win checker function, and a function to get the computer's move. The game should switch between human and computer turns until a winner is determined or the game is drawn. The function should be named `playGame`.
  assert playGame()==None
  assert playGame()==None
  assert playGame()==None
  assert playGame()==None
  assert playGame()==None
output: def playGame():
      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 all(board[i] == player for i in pattern):
                  return True
          return False
  
      def getComputerMove(board):
          import random
          available_moves = [i for i in range(9) if board[i] == ' ']
          return random.choice(available_moves)
  
      board = [' '] * 9
      players = ['X', 'O']
      turn = 0
  
      while True:
          drawBoard(board)
          current_player = players[turn % 2]
          if current_player == 'X':
              move = int(input("Enter your move (0-8): "))
          else:
              move = getComputerMove(board)
  
          if board[move] == ' ':
              board[move] = current_player
              if checkWin(board, current_player):
                  drawBoard(board)
                  print(f"Player {current_player} wins!")
                  return
              if ' ' not in board:
                  drawBoard(board)
                  print("It's a draw!")
                  return
              turn += 1
          else:
              print("Invalid move, try again.")