-
-
Save amankharwal/5133e2f739db9737437a131ff67bb0d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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