Logic for decks with cards
Project description
Status
License |
|
Versioning |
|
Documentation |
|
Tests |
|
Code Quality |
Library aimed at anyone who wants to do any kind of deck manipulation in python. So probably game developers. The goal is to have the ultimate library for all of this, supporting all kinds of game types with clean and beautiful API - kind of like requests :)
If you happeen to use this library - please do let me know, I’d like to explore how it’s being used. Also, you can leave a thank you note :)
How to use
First, install with pip:
pip install pyCardDeck
Then use in your code:
import pyCardDeck
my_deck = pyCardDeck.Deck(cards=[1, 2, 3], name='My Awesome Deck')
my_deck.shuffle()
card = my_deck.draw()
For more elaborate examples check out GitHub
For developers
The library will support Python 3.3+, for requirements look at requirements.txt in the repository.
This library should be very easy to contribute to for first timers. Nothing is sacred, File issues, contribute where you feel it’s useful and fun for you! If you need hlep, just ask.
Always aim to write clean and readable code, make sure the tests are passing, document in docstrings (rst format) and when writing new modules, classes or functions, add them to docs (we are using Shpinx autodocs)
Running tests
To run tests enter the pyCardDeck directory and run:
py.test tests
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
Built Distribution
File details
Details for the file pyCardDeck-1.4.0.macosx-10.9-x86_64.tar.gz
.
File metadata
- Download URL: pyCardDeck-1.4.0.macosx-10.9-x86_64.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 131703081f44c1d3eba53d6866368e1c0cec5b74e7b2dab9e6ba2c2e99c1f19e |
|
MD5 | 296c877378c15a10ba2653ac543fb8e8 |
|
BLAKE2b-256 | 90e8d430859953a21fce6af7c984e9c1968476959fd234024138152c45a82d7a |
File details
Details for the file pyCardDeck-1.4.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pyCardDeck-1.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a70b8aede18b96c06d4aa86b1e04d39376d14ad859141fc26cdf2daf1e9cbab9 |
|
MD5 | 274d512ab1492225328acd4f4c8b001c |
|
BLAKE2b-256 | 9cfdfe348eb6308b1ee9cbd2d6b5f6deff1edc451fc9cca2c315d28579b60226 |