/
constant.py
41 lines (33 loc) · 2.06 KB
/
constant.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
import random
DEBUG = True
BUST = 0
HIT = 1
STAND = 2
SPLIT = 3
DOUBLE = 4 #Double if possible. If not, hit.
DOUBLESTAND = 5 #Double if possible. If not, stand.
actions = ['BUST','HIT','STAND','SPLIT','DOUBLE','DOUBLESTAND']
NUM_DECKS = 6 #6-8
NUM_PLAYERS = 5 #MAX 7
values = ["A",2,3,4,5,6,7,8,9,10,"J","Q","K"]
suits = ['C','D','H','S'] #Clubs, Diamonds, Hearts, Spades
hard = {17:{2:STAND,3:STAND,4:STAND,5:STAND,6:STAND,7:STAND,8:STAND,9:STAND,'T':STAND,'A':STAND},
16:{2:STAND,3:STAND,4:STAND,5:STAND,6:STAND,7:HIT,8:HIT,9:HIT,'T':HIT,'A':HIT},
15:{2:STAND,3:STAND,4:STAND,5:STAND,6:STAND,7:HIT,8:HIT,9:HIT,'T':HIT,'A':HIT},
14:{2:STAND,3:STAND,4:STAND,5:STAND,6:STAND,7:HIT,8:HIT,9:HIT,'T':HIT,'A':HIT},
13:{2:STAND,3:STAND,4:STAND,5:STAND,6:STAND,7:HIT,8:HIT,9:HIT,'T':HIT,'A':HIT},
12:{2:HIT,3:HIT,4:STAND,5:STAND,6:STAND,7:HIT,8:HIT,9:HIT,'T':HIT,'A':HIT},
11:{2:DOUBLE,3:DOUBLE,4:DOUBLE,5:DOUBLE,6:DOUBLE,7:DOUBLE,8:DOUBLE,9:DOUBLE,'T':DOUBLE,'A':HIT},
10:{2:DOUBLE,3:DOUBLE,4:DOUBLE,5:DOUBLE,6:DOUBLE,7:DOUBLE,8:DOUBLE,9:DOUBLE,'T':HIT,'A':HIT},
9:{2:HIT,3:DOUBLE,4:DOUBLE,5:DOUBLE,6:DOUBLE,7:HIT,8:HIT,9:HIT,'T':HIT,'A':HIT},
8:{2:HIT,3:HIT,4:HIT,5:HIT,6:HIT,7:HIT,8:HIT,9:HIT,'T':HIT,'A':HIT}}
soft = {9:{2:STAND,3:STAND,4:STAND,5:STAND,6:STAND,7:STAND,8:STAND,9:STAND,'T':STAND,'A':STAND},
8:{2:STAND,3:STAND,4:STAND,5:STAND,6:STAND,7:STAND,8:STAND,9:STAND,'T':STAND,'A':STAND},
7:{2:STAND,3:DOUBLESTAND,4:DOUBLESTAND,5:DOUBLESTAND,6:STAND,7:STAND,8:STAND,9:HIT,'T':HIT,'A':HIT},
6:{2:HIT,3:DOUBLE,4:DOUBLE,5:DOUBLE,6:DOUBLE,7:HIT,8:HIT,9:HIT,'T':HIT,'A':HIT},
5:{2:HIT,3:HIT,4:DOUBLE,5:DOUBLE,6:DOUBLE,7:HIT,8:HIT,9:HIT,'T':HIT,'A':HIT},
4:{2:HIT,3:HIT,4:DOUBLE,5:DOUBLE,6:DOUBLE,7:HIT,8:HIT,9:HIT,'T':HIT,'A':HIT},
3:{2:HIT,3:HIT,4:HIT,5:DOUBLE,6:DOUBLE,7:HIT,8:HIT,9:HIT,'T':HIT,'A':HIT},
2:{2:HIT,3:HIT,4:HIT,5:DOUBLE,6:DOUBLE,7:HIT,8:HIT,9:HIT,'T':HIT,'A':HIT}}
names = ["Nick","John","Matthew","Bill","Carl","Nathan","Robert","Martha"]
random.shuffle(names)