-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathWater.java
More file actions
502 lines (335 loc) · 13.8 KB
/
Water.java
File metadata and controls
502 lines (335 loc) · 13.8 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
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Water{
public static void loopWater(GUI g){
Player p = g.getPlayer();
int code = p.getCode2();
if(p.getCode1() == 2){
if (code == 0){
water0(g);
}
if (code == 1){
water1(g);
}
else if (code == 2){
water2(g);
}
else if (code == 3){
water3(g);
}
else if (code == 4){
water4(g);
}
else if(code == 5){
water5(g);
}
else if (code == 6){
water6(g);
}
else if (code == 7){
water7(g);
}
else if (code == 8){
water8(g);
}
else if (code == 9){
water9(g);
}
else if (code == 10){
water10(g);
}
else if (code == 11){
water11(g);
}
else if (code == 12){
water12(g);
}
else if (code == 13){
water13(g);
}
else if (code == 14){
water14(g);
}
else if (code == 15){
water15(g);
}
else if (code == 16){
water16(g);
}
else if (code == 17){
water17(g);
}
else if (code == 18){
water18(g);
}
else if (code == 19){
water19(g);
}
else if (code == 20){
lost(g);
}
else if (code == 21){
win(g);
}
else if (code == 22){
credits(g);
}
}
}
public static void findNextWater(GUI g){
Player p = g.getPlayer();
int c = p.getCode2();
int op = p.getOp();
g.getPlayer().setLCode1(g.getPlayer().getCode1());
g.getPlayer().setLCode2(g.getPlayer().getCode2());
if(c==0){
if(op==1){
p.setCode2(1);
}
else{
p.setCode2(2);
}
}
else if (c==1){
if(op==1){
p.setCode2(3);
}
else{
p.setCode2(4);
}
}
else if(c==2){
if(op==1){
p.setCode2(3);
}
else{
p.setCode2(4);
}
}
else if(c ==3){
p.setCode2(5);
}
else if (c == 4){
p.setCode2(6);
}
else if (c == 5){
if(op==1){
p.setCode2(7);
}
else{
p.setCode2(8);
}
}
else if(c==6){
p.setCode2(3);
}
else if( c == 7) {
p.setCode2(8);
}
else if(c==8){
if(op==1){
p.setCode2(9);
}
else{
p.setCode2(13);
}
}
else if(c==9){
if(op==1){
p.setCode2(10);
}
else{
lost(g);
}
}
else if(c==10){
if(op==1){
p.setCode2(11);
}
else{
p.setCode2(12);
}
}
else if(c==11){
if(op==1){
p.setCode2(12);
}
else{
lost(g);
}
}
else if(c==12){
p.setCode2(14);
}
else if(c==13){
if(op==1){
p.setCode2(11);
}
else{
p.setCode2(12);
}
}
else if(c==14){
if(op==1){
p.setCode2(15);
}
else{
p.setCode2(16);
}
}
else if(c==15){
p.setCode2(17);
}
else if(c == 16){
p.setCode2(17);
}
else if(c==17){
if(op==1){
p.setCode2(18);
}
else{
win(g);
}
}
else if(c==18){
if(op==1){
lost(g);
}
else{
p.setCode2(19);
}
}
else if(c==19){
if(op==1){
lost(g);
}
else{
win(g);
}
}
else if(c==20){
if(op==1){
water0(g);
}
}
else if(c==21){
if(op==1){
water0(g);
}
else{
p.setCode2(22);
}
}
loopWater(g);
}
public static void water0(GUI g){
Branch water0 = new Branch(2,0, "go to the bathroom while he is talking", "go after he finishes", "water0.PNG", "You arrive to your daily compsci class but realize you have to go to the bathroom but Chris is in the middle of one of his long lectures.");
g.convert(water0);
}
public static void water1(GUI g){
Branch water1 = new Branch(2, 1, "Run back to the bathroom to cry", "Stand up for yourself and challenge him to an arm wrestle!", "water1.PNG", "You made it just in time, you relieve youself, but when you return Chris is MADDDDD!!!!");
g.convert(water1);
}
public static void water2(GUI g){
Branch water2 = new Branch(2, 2, "Run to the bathroom to clean up and cry", "Wipe your pee then stand up for yourself and challenge Chris to an arm wrestle!", "water2.PNG", "... You could not hold it long enough and end up peeing in class and Chris is MADDDD!!!!");
g.convert(water2);
}
public static void water3(GUI g){
Branch water3 = new Branch(2, 3, "Hot tub session in the toilet while reading your favorite book", "eat some chocolate you stole from Chris the other day", "water3.PNG", "You ran to the bathroom and you are crying what do you do to calm yourself down?");
g.convert(water3);
}
public static void water4(GUI g){
Branch water4 = new Branch(2, 4, "left hand", "right hand", "water4.PNG", "You walk up confidently you know you can beat him with either hand. Which one do you want to use?");
g.convert(water4);
}
public static void water5(GUI g){
Branch water5 = new Branch(2, 5, "you decide to scream for help", "you attempt to swim down the toilet to find out a cure for your poopiness", "water5.PNG", "You wake up and you are a brown, stinky, slimy piece of POOP!!! WHAT DO YOU DO?");
g.convert(water5);
}
public static void water6(GUI g){
Branch water6 = new Branch(2, 6, "run to the bathroom crying", "say you were going easy on him and go to the bathroom", "water6.png", "you LOSE :( Chris beats you in the arm wrestle and you are humiliated.");
g.convert(water6);
}
public static void water7(GUI g){
Branch water7 = new Branch(2,7, "CHRIS NOOOOOOOOOOOOOOOO", "AGHHHHHHHHHH", "water7.PNG", "You scream for help right as Chris comes in and he is still mad at you so he decides to flush you down the toilet! You get flushed and everything blurs as the water splashes and you zoom through the pipes!");
g.convert(water7);
}
public static void water8(GUI g){
Branch water8 = new Branch(2,8, "left", "right", "water8.PNG", "You end up making your way down the pipes and it gets difficult to see but you can feel the sides of the tubes, you continue to make you way down until you reach a split in the road, which way do you want to go?");
g.convert(water8);
}
public static void water9(GUI g){
Branch water9 = new Branch(2,9, "join the party!!!", "be a party POOPer and go back the other way", "water9.PNG", "You chose to go left... you reach a room with lots of poop, they all turn to stare and ask you to join their party.");
g.convert(water9);
}
public static void water10(GUI g){
Branch water10 = new Branch(2,10, "tell the others and go after Chris", "don't tell the others and leave quietly", "water10.PNG", "Time to partyyyy!!!! Soon you realize that these were the other missing students from Chris's class and realized he has cursed you because you made him mad!");
g.convert(water10);
}
public static void water11(GUI g){
Branch water11 = new Branch(2,11, "ditch them and keep going!", "keep trying together", "water11.PNG", "When you guys try to go after him there are too many poops in the pipe at once and you guys clog it!");
g.convert(water11);
}
public static void water12(GUI g){
Branch water12 = new Branch(2,12, "CELEBRATEEEEEE", "SCREAM WOOHOOOOOOOOOO I MADE IT", "water12.PNG", "You remember passing by a stinky area on your way to class, and you were right there is a leak! you escape the pipes through that leak");
g.convert(water12);
}
public static void water13(GUI g){
Branch water13 = new Branch(2,13, "BANG ON THE WINDOW AND LET THEM KNOW THAT CHRIS CURSED THEM AND YOU NEED TO GET REVENGE", "stay quiet and find your own way out", "water13.PNG", "You see a light and you realize it is a one-way window in the pipes, you can see a party going on on the other side and as you stare longer you realize they are other poops! You try to listen and hear a familiar voice.. You realize they were your old classmates!");
g.convert(water13);
}
public static void water14(GUI g){
Branch water14 = new Branch(2,14, "you decide to hijack the golf cart", "you roll your way over to the classroom", "water14.PNG", "What is the fastest way to get to the classroom?");
g.convert(water14);
}
public static void water15(GUI g){
Branch water15 = new Branch(2,15, "SHUT IT ive got bigger problems than you!", "SORRY THIS IS MY DUTY!", "water15.PNG", "You can hear people screaming and you scream back:");
g.convert(water15);
}
public static void water16(GUI g){
Branch water16 = new Branch(2,16, "I AGREE THIS IS WHY THE CAMPUS ALWAYS STINKS", "you would say the same thing if you smelled yourself", "water16.PNG", "you can hear people saying that you smell what do you say back to them?");
g.convert(water16);
}
public static void water17(GUI g){
Branch water17 = new Branch(2,17, "you come in screaming and threaten him to turn you back", "you say you are really sorry and that you love his class so so so much", "water17.PNG", "You arrive and you see Chris sitting in his classroom! What do you do???");
g.convert(water17);
}
public static void water18(GUI g){
Branch water18 = new Branch(2,18, "NOOOOOOOOO", "I CURSE YOU TOO!", "water18.PNG", "Chris screams back and traps you in the JENGA case you've seen on his desk, you realize there are stains from previous students. Chris tells you that you will never become human again...");
g.convert(water18);
}
public static void water19(GUI g){
Branch water19 = new Branch(2,19, "no", "yes", "water19.PNG", "Now you guys are both poop do you want to make a deal and turn eachother back?");
g.convert(water19);
}
public static void lost(GUI g){
Player p = g.getPlayer();
int c = p.getCode2();
if(c == 9){
Branch lost = new Branch(2,20,"restart section", "YOU LOSE", "lose.png", "YOU ARE SO BORING YOU REALLY ARE A PIECE OF... poop :((((");
g.convert(lost);
}
else if(c == 11){
Branch lost = new Branch(2,20,"restart section", "YOU LOSE", "lose.png", "YOU GUYS FURTHER CLOGGED THE TOILET AND SO WHEN SOMEONE FLUSHED YOU GUYS DROWNED");
g.convert(lost);
}
else if(c == 18){
Branch lost = new Branch(2,20,"restart section", "YOU LOSE", "lose.png", "CHRIS HATES YOU FOR SCREAMING BECAUSE IT HURTS HIS EAR AND THROWS YOU AWAY IN THE JENGA BOX");
g.convert(lost);
}
else if(c == 19){
Branch lost = new Branch(2,20,"restart section", "YOU LOSE", "lose.png", "YOU GUYS BOTH STAY POOP FOREVER");
g.convert(lost);
}
}
public static void win(GUI g){
Branch win = new Branch(2,21,"YEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA PLAY AGAIN????", "Credits>>", "win.png", "CHRIS SWITCHES YOU BACK INTO A HUMAN YAYYYY AND GIVES YOU A HUNDRED ON THE COMPSCI ASSIGMENT!!!!");
g.convert(win);
}
public static void credits(GUI g){//final
Branch credits = new Branch(2,22, ":D", "goodbye now", "nothing.png", "<html>This Choose Your Own Adventure Game is made by Sonja Larson, Catherine Liu, & Chloe Kim.</html>");
g.convert(credits);
}
}