PyPokerDeck

Issues Stars Tweet Follow on twitter

A python simple deck manager, using Deck of Cards API images.

Maintainer: DSGDSR

Installation and usage

Clone repository:

$ git clone https://github.com/DSGDSR/PyPokerDeck.git
$ cd PyPokerDeck

Usage

>>> deck = Deck(shuffle=True)                 # False by default
>>> deck.shuffle(times=2)                     # Custom shuffle (returns deck list)
>>> nc = deck.drawCards(2)                    # Draw 2 cards returning a list wiht them
>>> deck.reset()                              # Reset the deck without shuffling
>>> cc = deck.removeCard('8S')                # Removing a card returns its object
>>> sc = deck.searchCard('8S')                # Searching a card returns its object (None in case not found)

Features

  • Deck stored in json
  • All cards with image, suit, code and value
  • Deck shuffling
  • Card drawing, remove or search
  • Previews the sprite

TODO

  • Deploy as PyPi package
  • Tests