This repository was archived by the owner on Jul 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday_4.py
More file actions
373 lines (333 loc) · 16.6 KB
/
day_4.py
File metadata and controls
373 lines (333 loc) · 16.6 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
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
import random
uitslag1 = False
uitslag2 = False
uitslag3 = False
uitslag4 = False
uitslag5 = False
uitslag6 = False
while(uitslag1 == False or uitslag2 == False or uitslag3 == False or uitslag4 == False or uitslag5 == False):
print(" ")
icetown_goals = 5
icetown_against = 1
icetown_wins = 2
icetown_losses = 1
frostville_goals = 3
frostville_against = 5
frostville_wins = 2
frostville_losses= 1
glacierhampton_goals = 5
glacierhampton_against = 6
glacierhampton_wins = 1
glacierhampton_losses = 2
coldbury_goals = 4
coldbury_against = 5
coldbury_wins = 1
coldbury_losses = 2
wedstrijden: ["Icetown win", "Icetown win", "Icetown loss", "Frostville win", "Frostville win", "Frostville loss", "Glacierhampton win", "Glacierhampton loss", "Glacierhampton loss", "Coldbuty win", "Coldbury loss", "Coldbury loss"]
uitslagenlinks = []
uitslagenrechts = []
icevsfrost = False
icevsglacier = False
icevscold = False
frostvsglacier = False
frostvscold = False
coldvsglacier = False
uitslag1 = False
uitslag2 = False
uitslag3 = False
uitslag4 = False
uitslag5 = False
uitslag6 = False
match1 = ""
match2 = ""
match3 = ""
match4 = ""
match5 = ""
match6 = ""
goed = False
while(icevsfrost == False or icevsglacier == False or icevscold == False or frostvsglacier == False or frostvscold == False):
gescoord = random.randint(0, icetown_goals)
tegen = random.randint(0, icetown_against)
#icetown win 1
if(gescoord > tegen and uitslag1 == False and gescoord != icetown_goals and tegen != icetown_against):
tegenstander = random.randint(1,3)
#icetown vs frostville
if(tegenstander == 1 and icevsfrost == False and frostville_against - gescoord >= 0 and frostville_goals - tegen >= 0):
print("ICE VS FROST 1: " + str(gescoord) + ":" + str(tegen))
match1 = "IvsF"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
icetown_goals = icetown_goals - gescoord
icetown_against = icetown_against - tegen
icetown_wins = icetown_wins - 1
frostville_goals = frostville_goals - tegen
frostville_against = frostville_against - gescoord
frostville_losses = frostville_losses - 1
uitslag1 = True
icevsfrost = True
gescoord = random.randint(0,icetown_goals)
tegen = random.randint(0, icetown_against)
#icetown vs glacierhampton
elif(tegenstander == 2 and icevsglacier == False and glacierhampton_against - gescoord >= 0 and glacierhampton_goals - tegen >= 0):
print("ICE VS GLACIER 1: " + str(gescoord) + ":" + str(tegen))
match1 = "IvsG"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
icetown_goals = icetown_goals - gescoord
icetown_against = icetown_against - tegen
icetown_wins = icetown_wins - 1
glacierhampton_goals = glacierhampton_goals - tegen
glacierhampton_against = glacierhampton_goals - gescoord
glacierhampton_losses = glacierhampton_losses - 1
uitslag1 = True
icevsglacier = True
gescoord = random.randint(0,icetown_goals)
tegen = random.randint(0, icetown_against)
#icetown vs coldbury
elif(tegenstander == 2 and icevscold == False and coldbury_against - gescoord >= 0 and coldbury_goals - tegen >= 0):
print("ICE VS COLD 1: " + str(gescoord) + ":" + str(tegen))
match1 = "IvsC"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
icetown_goals = icetown_goals - gescoord
icetown_against = icetown_against - tegen
icetown_wins = icetown_wins - 1
coldbury_goals = coldbury_goals - tegen
coldbury_against = coldbury_goals - gescoord
coldbury_losses = coldbury_losses - 1
uitslag1 = True
icevscold = True
gescoord = random.randint(0,icetown_goals)
tegen = random.randint(0, icetown_against)
else:
gescoord = random.randint(0,icetown_goals)
tegen = random.randint(0, icetown_against)
#icetown win 2
if(gescoord > tegen and uitslag2 == False and uitslag1 == True and tegen != icetown_against):
tegenstander = random.randint(1,3)
#icetown vs frostville
if(tegenstander == 1 and icevsfrost == False and frostville_against - gescoord >= 0 and frostville_goals - tegen >= 0):
print("ICE VS FROST: " + str(icetown_goals) + ":" + str(tegen))
match2 = "IvsF"
uitslagenlinks.append(icetown_goals)
uitslagenrechts.append(tegen)
icetown_goals = 0
icetown_against = icetown_against - tegen
icetown_wins = icetown_wins - 1
frostville_goals = frostville_goals - tegen
frostville_against = frostville_against - gescoord
frostville_losses = frostville_losses - 1
uitslag2 = True
icevsfrost = True
gescoord = random.randint(0,icetown_goals)
tegen = random.randint(0, icetown_against)
#icetown vs glacierhampton
elif(tegenstander == 2 and icevsglacier == False and glacierhampton_against - gescoord >= 0 and glacierhampton_goals - tegen >= 0):
print("ICE VS GLACIER: " + str(icetown_goals) + ":" + str(tegen))
match2 = "IvsG"
uitslagenlinks.append(icetown_goals)
uitslagenrechts.append(tegen)
icetown_goals = 0
icetown_against = icetown_against - tegen
icetown_wins = icetown_wins - 1
glacierhampton_goals = glacierhampton_goals - tegen
glacierhampton_against = glacierhampton_goals - gescoord
glacierhampton_losses = glacierhampton_losses - 1
uitslag2 = True
icevsglacier = True
gescoord = random.randint(0,icetown_goals)
tegen = random.randint(0, icetown_against)
#icetown vs coldbury
elif(tegenstander == 2 and icevscold == False and coldbury_against - gescoord >= 0 and coldbury_goals - tegen >= 0):
print("ICE VS COLD: " + str(icetown_goals) + ":" + str(tegen))
match2 = "IvsC"
uitslagenlinks.append(icetown_goals)
uitslagenrechts.append(tegen)
icetown_goals = 0
icetown_against = icetown_against - tegen
icetown_wins = icetown_wins - 1
coldbury_goals = coldbury_goals - tegen
coldbury_against = coldbury_goals - gescoord
coldbury_losses = coldbury_losses - 1
uitslag2 = True
icevscold = True
gescoord = random.randint(0,icetown_goals)
tegen = random.randint(0, icetown_against)
else:
gescoord = random.randint(0,icetown_goals)
tegen = random.randint(0, icetown_against)
#icetown loss 1
if(gescoord < tegen and uitslag3 == False and uitslag1 == True and uitslag2 == True):
tegenstander = random.randint(1,3)
#icetown vs frostville
if(tegenstander == 1 and icevsfrost == False and frostville_against - gescoord >= 0 and frostville_goals - tegen >= 0):
print("ICE VS FROST: " + str(gescoord) + ":" + str(tegen))
match3 = "IvsF"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
icetown_goals = icetown_goals - gescoord
icetown_against = icetown_against - tegen
icetown_losses = icetown_losses - 1
frostville_goals = frostville_goals - tegen
frostville_against = frostville_against - gescoord
frostville_wins = frostville_wins - 1
uitslag3 = True
icevsfrost = True
gescoord = random.randint(0,icetown_goals)
tegen = random.randint(0, icetown_against)
#icetown vs glacierhampton
elif(tegenstander == 2 and icevsglacier == False and glacierhampton_against - gescoord >=0 and glacierhampton_goals - tegen >= 0):
print("ICE VS GLACIER: " + str(gescoord) + ":" + str(tegen))
match3 = "IvsG"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
icetown_goals = icetown_goals - gescoord
icetown_against = icetown_against - tegen
icetown_losses = icetown_losses - 1
glacierhampton_goals = glacierhampton_goals - tegen
glacierhampton_against = glacierhampton_goals - gescoord
glacierhampton_wins = glacierhampton_wins - 1
uitslag3 = True
icevsglacier = True
gescoord = random.randint(0,icetown_goals)
tegen = random.randint(0, icetown_against)
elif(tegenstander == 2 and icevscold == False and coldbury_against - gescoord >= 0 and coldbury_goals - tegen >= 0):
print("ICE VS COLD: " + str(gescoord) + ":" + str(tegen))
match2 = "IvsC"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
icetown_goals = icetown_goals - gescoord
icetown_against = icetown_against - tegen
icetown_losses = icetown_losses - 1
coldbury_goals = coldbury_goals - tegen
coldbury_against = coldbury_goals - gescoord
coldbury_wins = coldbury_wins - 1
uitslag3 = True
icevscold = True
gescoord = random.randint(0,icetown_goals)
tegen = random.randint(0, icetown_against)
else:
gescoord = random.randint(0,icetown_goals)
tegen = random.randint(0, icetown_against)
gescoord = random.randint(0, frostville_goals)
tegen = random.randint(0, frostville_against)
#frostville wins both
if(frostville_wins == 2 and gescoord > tegen and frostville_goals - gescoord > frostville_against - tegen):
tegenstander = random.randint(1,2) #1 = glacier and #2 is cold
#frostville vs glacier
if(tegenstander == 1 and gescoord != frostville_goals and tegen != frostville_against and glacierhampton_goals - tegen >= 0 and glacierhampton_against - gescoord >= 0 and coldbury_goals - tegen >= 0 and coldbury_against - gescoord >= 0):
print("FROST VS GLACIER: " + str(gescoord) + ":" + str(tegen))
match4 = "FvsG"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
frostville_goals = frostville_goals - gescoord
frostville_against = frostville_against - tegen
frostville_wins = frostville_wins - 1
glacierhampton_goals = glacierhampton_goals - tegen
glacierhampton_against = glacierhampton_against - gescoord
glacierhampton_losses = 0
uitslag4 = True
frostvsglacier = True
gescoord = frostville_goals
tegen = frostville_against
print("FROST VS COLD: " + str(gescoord) + ":" + str(tegen))
match4 = "FvsC"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
frostville_goals = 0
frostville_against = 0
frostville_wins = 0
coldbury_goals = coldbury_goals - tegen
coldbury_against = coldbury_against - gescoord
coldbury_losses = 0
uitslag5 = True
frostvscold = True
#frostville vs coldbury
elif(tegenstander == 2 and gescoord != frostville_goals and tegen != frostville_against and glacierhampton_goals - tegen >= 0 and glacierhampton_against - gescoord >= 0 and coldbury_goals - tegen >= 0 and coldbury_against - gescoord >= 0):
print("FROST VS COLD: " + str(gescoord) + ":" + str(tegen))
match4 = "FvsC"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
frostville_goals = 0
frostville_against = 0
frostville_wins = 0
coldbury_goals = coldbury_goals - tegen
coldbury_against = coldbury_against - gescoord
coldbury_losses = 0
uitslag4 = True
frostvscold = True
gescoord = frostville_goals
tegen = frostville_against
print("FROST VS GLACIER: " + str(gescoord) + ":" + str(tegen))
match5 = "FvsG"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
frostville_goals = frostville_goals - gescoord
frostville_against = frostville_against - tegen
frostville_wins = frostville_wins - 1
glacierhampton_goals = glacierhampton_goals - tegen
glacierhampton_against = glacierhampton_against - gescoord
glacierhampton_losses = 0
uitslag5 = True
frostvsglacier = True
elif(frostville_wins == 1 and gescoord > tegen):
if(tegen != frostville_against and glacierhampton_goals - tegen >= 0 and glacierhampton_against - gescoord >= 0 and coldbury_wins > 0 and coldbury_goals - tegen >= 0 and coldbury_against - gescoord >= 0):
print("FROST VS GLACIER: " + str(gescoord) + ":" + str(tegen))
match4 = "FvsG"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
frostville_goals = frostville_goals - gescoord
frostville_against = frostville_against - tegen
frostville_wins = 0
glacierhampton_goals = glacierhampton_goals - tegen
glacierhampton_against = glacierhampton_against - gescoord
glacierhampton_losses = 0
uitslag4 = True
frostvsglacier = True
gescoord = frostville_goals
tegen = frostville_against
print("FROST VS COLD: " + str(gescoord) + ":" + str(tegen))
match4 = "FvsC"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
frostville_goals = 0
frostville_against = 0
frostville_losses = 0
coldbury_goals = coldbury_goals - tegen
coldbury_against = coldbury_against - gescoord
coldbury_wins = 0
uitslag5 = True
frostvscold = True
elif(tegen != frostville_against and coldbury_goals - tegen >= 0 and coldbury_against - gescoord >= 0 and glacierhampton_wins > 0 and coldbury_goals - tegen >= 0 and coldbury_against - gescoord >= 0):
print("FROST VS COLD: " + str(gescoord) + ":" + str(tegen))
match4 = "FvsC"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
frostville_goals = frostville_goals - gescoord
frostville_against = frostville_against - tegen
frostville_wins = 0
coldbury_goals = coldbury_goals - tegen
coldbury_against = coldbury_against - gescoord
coldbury_losses = 0
uitslag4 = True
frostvscold = True
gescoord = frostville_goals
tegen = frostville_against
print("FROST VS GLACIER: " + str(gescoord) + ":" + str(tegen))
match4 = "FvsG"
uitslagenlinks.append(gescoord)
uitslagenrechts.append(tegen)
frostville_goals = 0
frostville_against = 0
frostville_losses = 0
glacierhampton_goals = glacierhampton_goals - tegen
glacierhampton_against = glacierhampton_against - gescoord
glacierhampton_wins = 0
uitslag5 = True
frostvsglacier = True
else:
gescoord = random.randint(0, frostville_goals)
tegen = random.randint(0, frostville_against)
else:
gescoord = random.randint(0, frostville_goals)
tegen = random.randint(0, frostville_against)