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, and a function to determine the computer's move. The main game function should manage the game loop and handle player and computer turns. If the given board is empty when the game starts then return True.
  assert playGame([])==True
  assert playGame(['-', '-', '-', '-', '-', '-', '-', '-', '-'])==True
  assert playGame(['X', 'O', 'X', '-', 'O', '-', '-', '-', 'O'])==True
  assert playGame(['X', 'O', 'X', 'O', 'X', 'O', 'X', 'O', 'X'])==True
output: def playGame(board):
      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 computerMove(board):
          import random
          available_moves = [i for i in range(9) if board[i] == '-']
          return random.choice(available_moves)
  
      if all(cell == '-' for cell in board):
          return True
  
      player_turn = True
      while '-' in board:
          drawBoard(board)
          if player_turn:
              move = int(input("Enter your move (0-8): "))
              if board[move] == '-':
                  board[move] = 'X'
              else:
                  print("Invalid move, try again.")
                  continue
          else:
              move = computerMove(board)
              board[move] = 'O'
  
          if checkWin(board, 'X'):
              drawBoard(board)
              print("You win!")
              return True
          elif checkWin(board, 'O'):
              drawBoard(board)
              print("Computer wins!")
              return True
  
          player_turn = not player_turn
  
      drawBoard(board)
      print("It's a draw!")
      return True