forked from wyfcyx/CriminalsRDancing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
table.py
32 lines (24 loc) · 731 Bytes
/
table.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
import players
from cards import card
from players import player
class table():
def __init__(self,players):
self._players=players
i=0
c=len(players)
for p in self._players:
p.num=i
i+=1
p.nums=c
def updata(self,data):
i=0
for p in self._players:
temp=[]
for name in data[i]:
temp.append(card(name))
p.handcard=temp
p1=player('p1',0,3,['common_ones','common_ones','common_ones','common_ones'])
p2=player('p2',1,3,['common_ones','common_ones','common_ones','common_ones'])
p3=player('p3',2,3,['common_ones','common_ones','common_ones','common_ones'])
t=table([p1,p2,p3])
print('1')