Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Oct 4, 2020
Embed
What would you like to do?
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