Skip to main content

Logic for decks with cards

Project description

Status

License MIT License
Versioning pypi Requirements Status
Documentation Documentation Status
Tests Travis CI Test Coverage
Code Quality Code Climate Issue Count

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyCardDeck-1.4.0.macosx-10.9-x86_64.tar.gz (15.0 kB view hashes)

Uploaded source

Built Distribution

pyCardDeck-1.4.0-py2.py3-none-any.whl (11.3 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page