Skip to content

Instantly share code, notes, and snippets.

@calthoff
Last active March 28, 2018 03:06
Show Gist options
  • Select an option

  • Save calthoff/f08ee4e7ab64baf2a69a898ea5c67cbb to your computer and use it in GitHub Desktop.

Select an option

Save calthoff/f08ee4e7ab64baf2a69a898ea5c67cbb to your computer and use it in GitHub Desktop.
from random import shuffle
class Deck:
def __init__(self):
self.cards = []
for i in range(2, 15):
for j in range(4):
self.cards.append(Card(i, j))
shuffle(self.cards)
def rm_card(self):
if len(self.cards) == 0:
return
return self.cards.pop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment