# Path: poker/_common.py
# class PokerEnum(_OrderableMixin, enum.Enum, metaclass=_PokerEnumMeta):
#     def __str__(self):
#         return str(self._value_[0])
# 
#     def __repr__(self):
#         val = self._value_[0]
#         apostrophe = "'" if isinstance(val, str) else ""
#         return f"{self.__class__.__name__}({apostrophe}{val}{apostrophe})"
# 
#     def __format__(self, format_spec):
#         return str(self._value_[0])
# 
#     @property
#     def val(self):
#         """The first value of the Enum member."""
#         return self._value_[0]
# 
# class _ReprMixin:
#     def __repr__(self):
#         return f"{self.__class__.__name__}('{self}')"
# 
# Path: poker/card.py
# class Rank(PokerEnum):
#     DEUCE = "2", 2
#     THREE = "3", 3
#     FOUR = "4", 4
#     FIVE = "5", 5
#     SIX = "6", 6
#     SEVEN = "7", 7
#     EIGHT = "8", 8
#     NINE = "9", 9
#     TEN = "T", 10
#     JACK = ("J",)
#     QUEEN = ("Q",)
#     KING = ("K",)
#     ACE = "A", 1
# 
#     @classmethod
#     def difference(cls, first, second):
#         """Tells the numerical difference between two ranks."""
# 
#         # so we always get a Rank instance even if string were passed in
#         first, second = cls(first), cls(second)
#         rank_list = list(cls)
#         return abs(rank_list.index(first) - rank_list.index(second))
# 
# class Card(_ReprMixin, metaclass=_CardMeta):
#     """Represents a Card, which consists a Rank and a Suit."""
# 
#     __slots__ = ("rank", "suit")
# 
#     def __new__(cls, card):
#         if isinstance(card, cls):
#             return card
# 
#         if len(card) != 2:
#             raise ValueError("length should be two in %r" % card)
# 
#         self = object.__new__(cls)
#         self.rank = Rank(card[0])
#         self.suit = Suit(card[1])
#         return self
# 
#     def __hash__(self):
#         return hash(self.rank) + hash(self.suit)
# 
#     def __eq__(self, other):
#         if self.__class__ is other.__class__:
#             return self.rank == other.rank and self.suit == other.suit
#         return NotImplemented
# 
#     def __lt__(self, other):
#         if self.__class__ is not other.__class__:
#             return NotImplemented
# 
#         # with same ranks, suit counts
#         if self.rank == other.rank:
#             return self.suit < other.suit
#         return self.rank < other.rank
# 
#     def __str__(self):
#         return f"{self.rank}{self.suit}"
# 
#     @property
#     def is_face(self):
#         return self.rank in FACE_RANKS
# 
#     @property
#     def is_broadway(self):
#         return self.rank in BROADWAY_RANKS
# 
# BROADWAY_RANKS = Rank("T"), Rank("J"), Rank("Q"), Rank("K"), Rank("A")


import re
import random
import itertools
import functools
    import cProfile
from decimal import Decimal
from pathlib import Path
from cached_property import cached_property
from ._common import PokerEnum, _ReprMixin
from .card import Rank, Card, BROADWAY_RANKS
                self._add_suited(value[0] + value[1])

            elif name == "X_BOTH":
                for rank in (r.val for r in Rank if r < Rank(value)):
                    self._add_suited(value + rank)
                    self._add_offsuit(value + rank)

            elif name == "OFFSUIT":
                self._add_offsuit(value[0] + value[1])

            elif name == "SUITED":
                self._add_suited(value[0] + value[1])

            elif name == "X_OFFSUIT":
                biggest = Rank(value)
                for rank in (rank.val for rank in Rank if rank < biggest):
                    self._add_offsuit(value + rank)

            elif name == "X_SUITED":
                biggest = Rank(value)
                for rank in (rank.val for rank in Rank if rank < biggest):
                    self._add_suited(value + rank)

            elif name == "BOTH_PLUS":
                smaller, bigger = Rank(value[0]), Rank(value[1])
                for rank in (rank.val for rank in Rank if smaller <= rank < bigger):
                    self._add_suited(value[1] + rank)
                    self._add_offsuit(value[1] + rank)

            elif name == "BOTH_MINUS":

# Path: poker/_common.py
# class PokerEnum(_OrderableMixin, enum.Enum, metaclass=_PokerEnumMeta):
#     def __str__(self):
#         return str(self._value_[0])
# 
#     def __repr__(self):
#         val = self._value_[0]
#         apostrophe = "'" if isinstance(val, str) else ""
#         return f"{self.__class__.__name__}({apostrophe}{val}{apostrophe})"
# 
#     def __format__(self, format_spec):
#         return str(self._value_[0])
# 
#     @property
#     def val(self):
#         """The first value of the Enum member."""
#         return self._value_[0]
# 
# class _ReprMixin:
#     def __repr__(self):
#         return f"{self.__class__.__name__}('{self}')"
# 
# Path: poker/card.py
# class Rank(PokerEnum):
#     DEUCE = "2", 2
#     THREE = "3", 3
#     FOUR = "4", 4
#     FIVE = "5", 5
#     SIX = "6", 6
#     SEVEN = "7", 7
#     EIGHT = "8", 8
#     NINE = "9", 9
#     TEN = "T", 10
#     JACK = ("J",)
#     QUEEN = ("Q",)
#     KING = ("K",)
#     ACE = "A", 1
# 
#     @classmethod
#     def difference(cls, first, second):
#         """Tells the numerical difference between two ranks."""
# 
#         # so we always get a Rank instance even if string were passed in
#         first, second = cls(first), cls(second)
#         rank_list = list(cls)
#         return abs(rank_list.index(first) - rank_list.index(second))
# 
# class Card(_ReprMixin, metaclass=_CardMeta):
#     """Represents a Card, which consists a Rank and a Suit."""
# 
#     __slots__ = ("rank", "suit")
# 
#     def __new__(cls, card):
#         if isinstance(card, cls):
#             return card
# 
#         if len(card) != 2:
#             raise ValueError("length should be two in %r" % card)
# 
#         self = object.__new__(cls)
#         self.rank = Rank(card[0])
#         self.suit = Suit(card[1])
#         return self
# 
#     def __hash__(self):
#         return hash(self.rank) + hash(self.suit)
# 
#     def __eq__(self, other):
#         if self.__class__ is other.__class__:
#             return self.rank == other.rank and self.suit == other.suit
#         return NotImplemented
# 
#     def __lt__(self, other):
#         if self.__class__ is not other.__class__:
#             return NotImplemented
# 
#         # with same ranks, suit counts
#         if self.rank == other.rank:
#             return self.suit < other.suit
#         return self.rank < other.rank
# 
#     def __str__(self):
#         return f"{self.rank}{self.suit}"
# 
#     @property
#     def is_face(self):
#         return self.rank in FACE_RANKS
# 
#     @property
#     def is_broadway(self):
#         return self.rank in BROADWAY_RANKS
# 
# BROADWAY_RANKS = Rank("T"), Rank("J"), Rank("Q"), Rank("K"), Rank("A")


# Path: poker/hand.py
import re
import random
import itertools
import functools
    import cProfile
from decimal import Decimal
from pathlib import Path
from cached_property import cached_property
from ._common import PokerEnum, _ReprMixin
from .card import Rank, Card, BROADWAY_RANKS

                self._add_suited(value[0] + value[1])

            elif name == "X_BOTH":
                for rank in (r.val for r in Rank if r < Rank(value)):
                    self._add_suited(value + rank)
                    self._add_offsuit(value + rank)

            elif name == "OFFSUIT":
                self._add_offsuit(value[0] + value[1])

            elif name == "SUITED":
                self._add_suited(value[0] + value[1])

            elif name == "X_OFFSUIT":
                biggest = Rank(value)
                for rank in (rank.val for rank in Rank if rank < biggest):
                    self._add_offsuit(value + rank)

            elif name == "X_SUITED":
                biggest = Rank(value)
                for rank in (rank.val for rank in Rank if rank < biggest):
                    self._add_suited(value + rank)

            elif name == "BOTH_PLUS":
                smaller, bigger = Rank(value[0]), Rank(value[1])
                for rank in (rank.val for rank in Rank if smaller <= rank < bigger):
                    self._add_suited(value[1] + rank)
                    self._add_offsuit(value[1] + rank)

            elif name == "BOTH_MINUS":

                smaller, bigger = Rank(value[0]), Rank(value[1])