Generic Card Class.
Bases: object
A collection of possibly recuring cards stored as codes.
Returns true if the given code is currently stored in this deck.
Returns how many cards in the deck have the specified value under the specified key in their info data.
This method requires a library to be stored in the deck instance and will return None if there is no library.
Returns how many cards in the deck have the specified attribute.
This method requires a library to be stored in the deck instance and will return None if there is no library.
Retrieve a card any number of cards from the top. Returns a Card object loaded from a library if one is specified otherwise just it will simply return its code.
If index is not set then the top card will be retrieved.
If cache is set to True (the default) it will tell the library to cache the returned card for faster look-ups in the future.
If remove is true then the card will be removed from the deck before returning it.
Move the top number of cards to the top of some other deck.
By default only one card will be moved if number is not specified.
Returns the number of remaining cards in the deck.
Sort the cards in the deck into a random order..
Retrieve the top number of cards as Librarian.Card objects in a list in order of top to bottom most card. Uses the decks .get_card and passes along the cache and remove arguments.