-
Notifications
You must be signed in to change notification settings - Fork 8
/
DealerStrategy.h
96 lines (94 loc) · 5.71 KB
/
DealerStrategy.h
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#define HIT 1
#define STAND 2
#define SPLIT 3
#define D_S 4
#define D_H 5
/*
0 A 2 3 4 5 6 7 8 9 10
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18+
*/
int dealer_hard[22][11] = {
/* Dealer 0 A 2 3 4 5 6 7 8 9 10
Player*/
/*0*/ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*1*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*2*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*3*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*4*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*5*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*6*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*7*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*8*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*9*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*10*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*11*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*12*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*13*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*14*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*15*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*16*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*17*/ , {0, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND}
/*18*/ , {0, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND}
/*19*/ , {0, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND}
/*20*/ , {0, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND}
/*21*/ , {0, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND}
};
int dealer_soft[22][11] = {
/* Dealer 0 A 2 3 4 5 6 7 8 9 10
Player*/
/*0*/ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*1*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*2*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*3*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*4*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*5*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*6*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*7*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*8*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*9*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*10*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*11*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*12*/ , {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*13*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*14*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*15*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*16*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*17*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*18*/ , {0, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND}
/*19*/ , {0, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND}
/*20*/ , {0, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND}
/*21*/ , {0, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND}
};
int dealer_split[11][11] = {
/* Dealer 0 A 2 3 4 5 6 7 8 9 10
Player*/
/*0,0*/ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/*1,1*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*2,2*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*3,3*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*4,4*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*5,5*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*6,6*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*7,7*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*8,8*/ , {0, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT, HIT}
/*9,9*/ , {0, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND}
/*10,10*/ , {0, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND, STAND}
};