def METHOD_NAME(self):
    board_full = (self._boards == 0).sum(dim=(1, 2)) == 0
    B = self._B.unsqueeze(-1).unsqueeze(-1)
    lines = self._boards[B, self._line_y, self._line_x]
    player0_won = ((lines == self._player_0).sum(dim=2) == 3).any(dim=1)
    player1_won = ((lines == self._player_1).sum(dim=2) == 3).any(dim=1)
    return torch.max(board_full, torch.max(player0_won, player1_won))