class vox_cards.hand.Hand(deck)

A hand class that gives functionality to drawing, discarding, and holding cards from a deck. This class should typically not be created, but inheriting from this class to give extended functionality to a player class is encouraged. You cand replace the Deck().hands property with a list of your player classes.

Parameters:deck (Deck) – the deck that this hand belongs to
Returns:A Hand class that is iterable.
Return type:Hand

The number of cards in this hand.

Returns:The length of hand.cards
Return type:int

Remove [to_discard] amount of cards fromt his hand at random and add them to hand.deck.discarded_cards list.

Parameters:to_discard (int (, optional)) – Amount of cards to discard, defaults to 1

Simulates drawing [amount] of cards from the top of the deck, rather then getting a random card.

Parameters:amount (int (, optional)) – Number of cards to draw, defaults to 1
Returns:Returns the card(s) that were drawn.
Return type:list of Card