-
Notifications
You must be signed in to change notification settings - Fork 0
/
PayoutTable.py
92 lines (60 loc) · 2.68 KB
/
PayoutTable.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
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
class PayoutTable(list):
def __init__(self, payout_list):
super(PayoutTable, self).__init__()
self.populate(payout_list)
def populate(self, payout_list):
self.append(RoyalFlushPayout(payout_list[0]))
self.append(StraightFlushPayout(payout_list[1]))
self.append(QuadsPayout(payout_list[2]))
self.append(FullHousePayout(payout_list[3]))
self.append(StraightPayout(payout_list[4]))
self.append(FlushPayout(payout_list[5]))
self.append(TripsPayout(payout_list[6]))
self.append(TwoPairPayout(payout_list[7]))
self.append(PairPayout(payout_list[8]))
def print_info(self):
for k in range(9):
print "Payout k = "
print " Payout Type = %s" % self[k].get_payout_type()
print "Payout Value = "
print " Payout Value = %i" % self[k].get_payout_value()
class Payout(object):
def __init__(self, _payout_value, _payout_type):
self._payout_value = _payout_value
self._payout_type = _payout_type
def get_payout_value(self):
return self._payout_value
def get_payout_type(self):
return self._payout_type
def print_info(self):
print "Payout k = "
print " Payout Type = %s" % self._payout_type
print "Payout Value = "
print " Payout Value = $i" % self._payout_value
class RoyalFlushPayout(Payout):
def __init__(self, _payout_value):
super(RoyalFlushPayout, self).__init__(_payout_value, "Royal Flush Payout")
class StraightFlushPayout(Payout):
def __init__(self, _payout_value):
super(StraightFlushPayout, self).__init__(_payout_value, "Straight Flush Payout")
class QuadsPayout(Payout):
def __init__(self, _payout_value):
super(QuadsPayout, self).__init__(_payout_value, "Quads Payout")
class FullHousePayout(Payout):
def __init__(self, _payout_value):
super(FullHousePayout, self).__init__(_payout_value, "Full House Payout")
class StraightPayout(Payout):
def __init__(self, _payout_value):
super(StraightPayout, self).__init__(_payout_value, "Straight Payout")
class FlushPayout(Payout):
def __init__(self, _payout_value):
super(FlushPayout, self).__init__(_payout_value, "Flush Payout")
class TripsPayout(Payout):
def __init__(self, _payout_value):
super(TripsPayout, self).__init__(_payout_value, "Trips Payout")
class TwoPairPayout(Payout):
def __init__(self, _payout_value):
super(TwoPairPayout, self).__init__(_payout_value, "Two Pair Payout")
class PairPayout(Payout):
def __init__(self, _payout_value):
super(PairPayout, self).__init__(_payout_value, "Pair Payout")