# 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))


import io
import itertools
import attr
import pytz
from datetime import datetime
from zope.interface import Interface, Attribute
from cached_property import cached_property
from .card import Rank
            first.rank == second.rank for first, second in self._all_combinations
        )

    @cached_property
    def has_straightdraw(self):
        return any(1 <= diff <= 3 for diff in self._get_differences())

    @cached_property
    def has_gutshot(self):
        return any(1 <= diff <= 4 for diff in self._get_differences())

    @cached_property
    def has_flushdraw(self):
        return any(
            first.suit == second.suit for first, second in self._all_combinations
        )

    @cached_property
    def players(self):
        if not self.actions:
            return None
        player_names = []
        for action in self.actions:
            player_name = action.name
            if player_name not in player_names:
                player_names.append(player_name)
        return tuple(player_names)

    def _get_differences(self):
        return (

# 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))


# Path: poker/handhistory.py
import io
import itertools
import attr
import pytz
from datetime import datetime
from zope.interface import Interface, Attribute
from cached_property import cached_property
from .card import Rank

            first.rank == second.rank for first, second in self._all_combinations
        )

    @cached_property
    def has_straightdraw(self):
        return any(1 <= diff <= 3 for diff in self._get_differences())

    @cached_property
    def has_gutshot(self):
        return any(1 <= diff <= 4 for diff in self._get_differences())

    @cached_property
    def has_flushdraw(self):
        return any(
            first.suit == second.suit for first, second in self._all_combinations
        )

    @cached_property
    def players(self):
        if not self.actions:
            return None
        player_names = []
        for action in self.actions:
            player_name = action.name
            if player_name not in player_names:
                player_names.append(player_name)
        return tuple(player_names)

    def _get_differences(self):
        return (

            Rank.difference(first.rank, second.rank)