/
sloots.py
211 lines (191 loc) · 6.47 KB
/
sloots.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
#Hi Griff
#Version 0.6.1
import random
import time
def wait(n):
time.sleep(n)
round = 1
score = 100
def instructions():
print "I N S T R U C T I O N S"
print "You can spin the slots as long as you have"
print "money. The lowest buy in is $5. The amount of"
print "money you receive for winning is based on the"
print "amount of money you bet. The higher your risk"
print "the higher your reward. The rewards are:"
print " "
print "Three Churries: 2 x bet Two Churries: 1 x bet"
print "Three Blannervy: 5 x bet Two Blannervy: 2.5 x bet"
print "Three Gurps: 7 x bet Two Gurps: 3.5 x bet"
print "Three BAR: 10 x bet Two BAR: 5 x bet"
print "Three 7s: 25 x bet Two 7s: 12.5 x bet"
print "Three Mystery: BONUS ROUND"
print "Three Bonus: BONUS GAME"
print " "
def bonus_round():
a = random.randint(0,5)
b = random.randint(5,10)
c = random.randint(-30,20)
print "Welcome to the bonus round! In this mode, three random numbers will"
print "be added together, then your bet will be returned times the sum of "
print "these numbers. Good luck and may RNGesus be with you."
print " "
print "This doesn't work right now..."
def bonus_round2(n):
global score
roundy = 0
print "Welcome to the bonus round! In this game mode,"
print "you will be offered an initial money value"
print "that is given to you as a bonus. You can change"
print "the bonus offer amount up to 3 times, but it"
print "has an equal chance of increasing as decreasing!"
print "After 3 changes, you are required to take the"
print "fourth and final offer. Good luck!"
print " "
print " "
init_off = random.randint(1, 200)
print "OFFER:" + str(init_off)
print " "
while roundy < 3:
x = raw_input("Would you like to change the offer? (Y/N)").lower()
if x == "y":
init_off += random.randit(-300,300)
roundy += 1
print init_off
elif x == "n":
roundy = 3
else:
print "Please input either 'y' or 'n'"
rere = init_off + money
score += rere
re = str(rere)
print "In total, you earned $ %s from the bonus round." % re
def sloots():
global score
global round
print " "
print "Money: $ %s" % score
print " "
t = True
while (t):
money = raw_input("How much money would you like to bet? $")
try:
money = float(money)
if money < 5.0:
print "Put in more money."
elif money > 5000:
print "Sorry, that is too much money. Please enter a lower amount."
elif money > score:
print "Insufficient funds. Please try again."
else:
score -= money
t = False
except:
print "That doesn't work"
options = ["7", "Churry", "Churry", "Churry", "Churry", "Churry","Blanabber","Bonus", "Bonus", "Bonus", "Blanabber","Blanabber","Blanabber","Gurps","Gurps", "Gurps", "BAR", "BAR", "Mystery"]
yes = True
while (yes):
a = raw_input("Are you ready to spin? (Y/N) ").lower()
if a != "y" and a !="n":
print "Please enter either 'y' or 'n'"
elif a == "n":
print "Then why did you select this game in the first place?"
yes = False
elif a == "y":
print " "
print "Spinning..."
wait(1)
print "."
wait(1)
print "."
wait(1)
print "."
wait(2)
print " "
yes = False
if a == "y":
true = True
while (true):
one = options[random.randint(0,18)]
two = options[random.randint(0,18)]
three = options[random.randint(0,18)]
print " "
print one
wait(1)
print two
wait(1)
print three
wait(1)
print " "
if one == two and two == three:
wait(1)
print "Three of a kind!"
if one == "Churry":
score += money * 3
elif two == "Blanabber":
score += money * 6
elif three == "Gurps":
score += money * 8
elif one == "BAR":
score += money * 11
elif one == "Mystery":
print "This will come later... Returning money"
score += money
elif one == "7":
score += money * 26
elif one == "Bonus":
bonus_round2(money)
elif one == two or one == three:
wait(1)
print "Two of a kind!"
if one == "Churry":
score += money * 2
elif one == "Blanabber":
score += money * 3.5
elif one == "Gurps":
score += money * 4.5
elif one == "BAR":
score += money * 6
elif one == "7":
score += money * 13.5
elif two == one or two == three:
wait(1)
print "Two of a kind!"
if two == "Churry":
score += money * 2
elif two == "Blanabber":
score += money * 3.5
elif two == "Gurps":
score += money * 4.5
elif two == "BAR":
score += money * 6
elif two == "7":
score += money * 13.5
else:
print "Sorry! Better luck next time!"
true = False
print " "
print "Total money: %s" % score
print " "
wait(2)
round += 1
def init():
global score
x = True
while (x):
rounds = raw_input("Would you like to play? (Y/N)").lower()
if rounds == "y":
if score > 5:
sloots()
else:
print "YOU DO NOT HAVE ENOUGH MONEY TO PLAY. GAME OVER"
x = False
elif rounds == "n":
print " "
x = False
else:
print "Please input either 'y' or 'n'"
print "Return: %s" %score
instructions()
init()
awoiefhawe = raw_input("Press enter to close")