Skip to content

suhasgaddam/deck-of-cards-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deck-of-cards-python

A Python Implementation Of A Deck of Cards

Build Status Documentation Status

Example Usage

import deck_of_cards.deck as deck
import deck_of_cards.card as card

joker = card.Card(card.JOKER_RANK, card.JOKER_SUIT)
ace_of_spades = card.Card(1, 'spades')
print joker
print ace_of_spades

new_deck = deck.Deck(with_jokers=True)
new_deck.shuffle()
while not new_deck.is_empty():
    c_card = new_deck.deal()
    print c_card
    new_deck.discard(c_card)

Tests require pytest and numpy.

Test Usage when in deck-of-cards-python folder

py.test

About

A Python Implementation Of A Deck of Cards

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published