input: Write a function that implements an AI Tic-Tac-Toe game in Python. The function should include a board printing method, a win-checking method, a method to determine the computer's move, and a function to start and control the game. The game should alternate turns between a human player (marked as 'X') and the computer (marked as 'O'), checking for a win condition after each move. If the board fills up without a winner, the game should end in a draw. If the game is successfully implemented, the following assert statements should pass:
  
  assert main() == None
  assert drawBoard == "[printed board]"
  assert checkWin(['-','O','O','O','-','-','-','-','-','-'], 'O') == True
  assert checkWin(['-','-','X','-','X','-','X','-','-','-'], 'X') == True
  assert getComputerSpot(['-','-','-','-','-','-','-','-','-','-'],'O') in [1,2,3,4,5,6,7,8,9]
  assert getComputerSpot(['-','O','X','O','X','O','O','X','-','O'],'O') == None
  assert playGame() == None
output: def main():
      def drawBoard(board):
          print(f"{board[1]}|{board[2]}|{board[3]}")
          print("-+-+-")
          print(f"{board[4]}|{board[5]}|{board[6]}")
          print("-+-+-")
          print(f"{board[7]}|{board[8]}|{board[9]}")
  
      def checkWin(board, player):
          win_patterns = [(1, 2, 3), (4, 5, 6), (7, 8, 9), (1, 4, 7), (2, 5, 8), (3, 6, 9), (1, 5, 9), (3, 5, 7)]
          for a, b, c in win_patterns:
              if board[a] == board[b] == board[c] == player:
                  return True
          return False
  
      def getComputerSpot(board, computer):
          available_spots = [i for i in range(1, 10) if board[i] == '-']
          if not available_spots:
              return None
          return available_spots[0]
  
      def playGame():
          board = ['-'] * 10
          players = ['X', 'O']
          turn = 0
          while True:
              drawBoard(board)
              current_player = players[turn % 2]
              if current_player == 'X':
                  spot = int(input("Enter your move (1-9): "))
              else:
                  spot = getComputerSpot(board, 'O')
                  if spot is None:
                      print("Draw!")
                      break
              board[spot] = current_player
              if checkWin(board, current_player):
                  drawBoard(board)
                  print(f"{current_player} wins!")
                  break
              turn += 1
              if turn == 9:
                  drawBoard(board)
                  print("Draw!")
                  break
  
      playGame()