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 card_deck
Creating and dealing from a deck of cards
from card_deck import *
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for card_deck-1.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87153421674f4034dbc46d312b5629e0e7c657a5b51110a9224f6e759464d4dc |
|
MD5 | 452759aea14ab64fc5eda7a6fb3d1412 |
|
BLAKE2b-256 | 3af63c6d56ba6c3f0283dbe05db6c844e7e0cda20a305a8667379787db792d3b |