-
Notifications
You must be signed in to change notification settings - Fork 2
/
card_pack.py
36 lines (25 loc) · 936 Bytes
/
card_pack.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
from cards import *
from special_cards import *
class Deck():
def __init__(self):
self.deck = []
self.cardsValue = {"+ 2":20,"Return":20,"Intermission":20,"+ 4":50,"Choose color":50}
self.recycledCards = []
def fillDeck(self,cards):
for e in cards:
self.deck += e
def steal(self,player):
choose = randint(0,len(self.deck)-1)
print("You took the card {}".format(self.deck[choose]))
player.hand.append(self.deck[choose])
self.deck.remove(self.deck[choose])
def handOut(self,players):
for j in players:
for s in range(0,7):
if j.retired == "":
choose = randint(0,len(self.deck)-1)
j.hand.append(self.deck[choose])
self.deck.remove(self.deck[choose])
cardPack = Deck()
cardList = [specials.list,commonCards.list]
cardPack.fillDeck(cardList)