input: from typing import List
  
  
  class TicTacToe:
      def __init__(self):
          self.board = [['_' for _ in range(3)] for _ in range(3)]
          self.turn = 'x'
      
      def display(self):
          for row in self.board:
              print(' '.join(row))
  
      def check_win(self):
          board = self.board
  
          # check if the player with the current turn has a row of three
          for row in self.board:
              if row.count(self.turn) == 3:
                  return True
          
          # check if the player with the current turn has a column of three
          for col in range(3):
              if board[0][col] == board[1][col] and board[1][col] == board[2][col] and board[2][col] == self.turn:
                  return True
          
          # check for the two diagonals
          if board[0][0] == board[1][1] and board[1][1] == board[2][2] and board[2][2] == self.turn:
              return True
          if board[0][2] == board[1][1] and board[1][1] == board[2][0] and board[2][0] == self.turn:
              return True
          return False
  
  # Test cases
  tic_tac_toe = TicTacToe()
  tic_tac_toe.board = [['x', 'x', 'x'], ['_', '_', '_'], ['_', '_', '_']]
  assert tic_tac_toe.check_win() == True
  
  tic_tac_toe = TicTacToe()
  tic_tac_toe.board = [['o', '_', '_'], ['o', '_', '_'], ['o', '_', '_']]
  assert tic_tac_toe.check_win() == True
  
  tic_tac_toe = TicTacToe()
  tic_tac_toe.board = [['o', '_', '_'], ['_', 'o', '_'], ['_', '_', 'o']]
  assert tic_tac_toe.check_win() == True
  
  tic_tac_toe = TicTacToe()
  tic_tac_toe.board = [['_', '_', 'o'], ['_', 'o', '_'], ['o', '_', '_']]
  assert tic_tac_toe.check_win() == True
  
  tic_tac_toe = TicTacToe()
  tic_tac_toe.board = [['_', '_', 'x'], ['_', '_', '_'], ['_', '_', '_']]
  assert tic_tac_toe.check_win() == False
  
output:     
      def make_move(self, row: int, col: int):
          if self.board[row][col] == '_':
              self.board[row][col] = self.turn
              if self.check_win():
                  return f"Player {self.turn} wins!"
              self.turn = 'o' if self.turn == 'x' else 'x'
          else:
              return "Invalid move, try again."
  
      def is_full(self):
          return all(cell != '_' for row in self.board for cell in row)
  
      def play(self):
          while not self.is_full():
              self.display()
              try:
                  row, col = map(int, input(f"Player {self.turn}, enter your move (row col): ").split())
                  result = self.make_move(row, col)
                  if result:
                      print(result)
                      if "wins" in result:
                          self.display()
                          return
              except ValueError:
                  print("Invalid input, try again.")
          print("Game over, it's a draw!")
          self.display()
  