An object model of a pack of cards
Project description
Card Deck
An object model of a pack of cards, written in Python, to streamline writing programs to model/play games involving cards
Documentation
Documentation for the library can be found here: https://card-deck.readthedocs.io/en/latest/
Importing the module
from card_deck import *
Creating and dealing from a deck of cards
d = Deck()
# Deal 5 cards from the deck into 3 different hands
hands = d.deal(3,5)
Taking user input to create a Card object
inp = str(input("Enter the typeable name of a card: "))
card = Card.get_from_typeable_name(inp)
print(card)
Installation
pip install card-deck
Requirements
There are no additional required libraries
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
card_deck-1.2.0.tar.gz
(5.4 kB
view hashes)
Built Distribution
card_deck-1.2.0-py3-none-any.whl
(10.0 kB
view hashes)
Close
Hashes for card_deck-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69ddfb63e26a9cda4aec4c8a901e80aa4f9ac0500dddb8a095228b069ee72bf0 |
|
MD5 | 41b6133b8cc3c69368978290f00be22a |
|
BLAKE2b-256 | 617fdf32e4564d3ea6f712bf183aa1228343a5c4ceab946e59c1790549234368 |