Deck

class vox_cards.deck.Deck(hands=1, jokers=False)

A class allowing the control of hands, and storing the cards used.

Parameters:
  • hands (int) – The number of hands to construct the deck with.
  • jokers (bool) – Whether or not to construct the deck with 2 additional joker cards.
Returns:

Returns a deck object that is iterable.

Return type:

Deck

deal(amount=7)

Deals [amount] cards to all hands.

Parameters:amount (int (, optional)) – Amount of cards to deal to players, defaults to 7
shuffle(new_deck=False)

Shuffle the deck in place.

Parameters:new_deck (bool (, optional)) – Whether or nor to reset the deck back to it’s original state, removing all cards from hands, and setting drawn_cards and discarded cards back to empty lists.