Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created October 4, 2020 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save amankharwal/5133e2f739db9737437a131ff67bb0d5 to your computer and use it in GitHub Desktop.
Save amankharwal/5133e2f739db9737437a131ff67bb0d5 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