input: Write a function to develop an AI Tic-Tac-Toe game using Python. The function should include a function to print the board, a function to check if a player has won, a function to get a move for the computer, and a function to play the game. The game should alternate between the human player and the computer until a win or draw condition is met.
  assert playGame() is None
  assert playGame() is None
  assert playGame() is None
  assert playGame() is None
  assert playGame() is None
output: def playGame():
      board = [' ' for _ in range(9)]
  
      def printBoard():
          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(player):
          winConditions = [(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 condition in winConditions:
              if board[condition[0]] == board[condition[1]] == board[condition[2]] == player:
                  return True
          return False
  
      def getComputerMove():
          import random
          availableMoves = [i for i, x in enumerate(board) if x == ' ']
          return random.choice(availableMoves)
  
      def play():
          currentPlayer = 'X'
          while True:
              printBoard()
              if currentPlayer == 'X':
                  move = int(input("Enter your move (0-8): "))
                  if board[move] != ' ':
                      print("Invalid move, try again.")
                      continue
              else:
                  move = getComputerMove()
              board[move] = currentPlayer
              if checkWin(currentPlayer):
                  printBoard()
                  print(f"Player {currentPlayer} wins!")
                  break
              if ' ' not in board:
                  printBoard()
                  print("It's a draw!")
                  break
              currentPlayer = 'O' if currentPlayer == 'X' else 'X'
  
      play()