-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcards.py
More file actions
60 lines (58 loc) · 2.21 KB
/
cards.py
File metadata and controls
60 lines (58 loc) · 2.21 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
# dictionary of (cards, png_file)
def card_conversion(card):
card_dict = {'2H': 'images/2H.png',
'3H': 'images/3H.png',
'4H': 'images/4H.png',
'5H': 'images/5H.png',
'6H': 'images/6H.png',
'7H': 'images/7H.png',
'8H': 'images/8H.png',
'9H': 'images/9H.png',
'10H': 'images/10H.png',
'AH': 'images/AH.png',
'JH': 'images/JH.png',
'QH': 'images/QH.png',
'KH': 'images/KH.png',
'2S': 'images/2S.png',
'3S': 'images/3S.png',
'4S': 'images/4S.png',
'5S': 'images/5S.png',
'6S': 'images/6S.png',
'7S': 'images/7S.png',
'8S': 'images/8S.png',
'9S': 'images/9S.png',
'10S': 'images/10S.png',
'AS': 'images/AS.png',
'JS': 'images/JS.png',
'QS': 'images/QS.png',
'KS': 'images/KS.png',
'2C': 'images/2C.png',
'3C': 'images/3C.png',
'4C': 'images/4C.png',
'5C': 'images/5C.png',
'6C': 'images/6C.png',
'7C': 'images/7C.png',
'8C': 'images/8C.png',
'9C': 'images/9C.png',
'10C': 'images/10C.png',
'AC': 'images/AC.png',
'JC': 'images/JC.png',
'QC': 'images/QC.png',
'KC': 'images/KC.png',
'2D': 'images/2D.png',
'3D': 'images/3D.png',
'4D': 'images/4D.png',
'5D': 'images/5D.png',
'6D': 'images/6D.png',
'7D': 'images/7D.png',
'8D': 'images/8D.png',
'9D': 'images/9D.png',
'10D': 'images/10D.png',
'AD': 'images/AD.png',
'JD': 'images/JD.png',
'QD': 'images/QD.png',
'KD': 'images/KD.png',
'back': 'images/back.png'}
return card_dict[card]
# for testing
print(card_conversion('2H'))