-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hand.py
48 lines (38 loc) · 1.16 KB
/
Hand.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from card import *
from cards import *
#The hand class holds all of the cards in a player's hand
class Hand:
def __init__(self):
self.name = 3
self.cards = []
for i in range (10):
self.cards.append(NULL_CR())
#Draws a card into self from the given deck
def draw(self, deck):
i = 0
while self.cards[i].getName() != "Null" and i < 9:
print self.cards[i].getName()
i+=1
if i != 10:
self.cards[i] = deck.draw()
def getCards(self):
return self.cards
def setNull(self, pos):
self.cards[pos] = NULL_CR()
#Draws cards to initialize the hand
def initialize(self, deck):
for i in range (7):
self.cards[i] = deck.draw()
class NULL_CR(Creature):
def __init__(self):
self.name = "Null"
self.power = 0
self.toughness = 0
self.cost = 0
self.classType = "neutral"
self.creatureType = None
self.battleCry = None
self.buffs = []
self.img = "abusive_sergeant.png"
def isNull(self):
return True