poker_ai.terminal.ascii_objects package¶
Submodules¶
poker_ai.terminal.ascii_objects.card_collection module¶
-
class
poker_ai.terminal.ascii_objects.card_collection.
AsciiCardCollection
(*cards, hide_cards: bool = False, term: blessed.terminal.Terminal = None)¶ Bases:
object
-
static
_ascii_card
(*cards, return_string=True)¶ Instead of a boring text version of the card we render an ASCII image of the card. :param cards: One or more card objects :param return_string: By default we return the string version of the card, but the dealer hide the 1st card and we keep it as a list so that the dealer can add a hidden card in front of the list
-
_create_card_collection_str
(*cards, return_string=True) → Tuple[str, int, int]¶ Essentially the dealers method of print ascii cards. This method hides the first card, shows it flipped over :param cards: A list of card objects, the first will be hidden :return: A string, the nice ascii version of cards
-
update
(hide_cards: bool)¶
-
static
poker_ai.terminal.ascii_objects.logger module¶
poker_ai.terminal.ascii_objects.player module¶
-
class
poker_ai.terminal.ascii_objects.player.
AsciiPlayer
(*cards, term: blessed.terminal.Terminal, name: str = '', og_name: str = '', chips_in_pot: int = 0, chips_in_bank: int = 0, folded: bool = False, is_turn: bool = False, is_small_blind: bool = False, is_big_blind: bool = False, is_dealer: bool = False, **card_collection_kwargs)¶ Bases:
object
-
stylise_name
(name: str, extra: str) → str¶
-
update
()¶
-