-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGroupProjectCode.java
3027 lines (2998 loc) · 112 KB
/
GroupProjectCode.java
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
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;
public class GroupProjectCode {
public static void main(String[] args) {
GameHub();
}
//GameHud. This is what you see when the code starts and allows you to select the various game modes.
public static char GameHub(){
Scanner input = new Scanner(System.in);
System.out.println("GAME HUB: PLEASE SELECT A GAME \n"
+ "(1) Hangman - The classic game of guessing letters to spell out a word. \n"
+ "(2) Deck of Cards Game - Play one of the most exciting and rivoting games of the 20th century! \n"
+ "(3) Ball Drop Game - It's like Plinko but without the prizes! Or Drew Carrey.");
//TryCatch to make sure proper inputs are put into the program
try{
int whichGame = input.nextInt();
if (whichGame == 1){
//Input Josh's code here
for (int i = 0; i < 100; ++i) System.out.println();
System.out.println("Console Refreshed");
System.out.print(HangmanCustomMethod());
}
if (whichGame == 2){
String[] args = null;
//Input Kade's code here
gameCustomMethod(args);
}
if (whichGame ==3){
//Input Lane's code here
LaneCustomMethod();
}
if(whichGame >=4){
for (int i = 0; i < 100; ++i) System.out.println();
System.out.println("RESISTANCE IS FUTILE. INPUT A CORRECT NUMBER!");
System.out.println("RESTARTING GAME");
System.out.print(GameHub());
}
if(whichGame <= 0){
for (int i = 0; i < 100; ++i) System.out.println();
System.out.println("RESISTANCE IS FUTILE. INPUT A CORRECT NUMBER!");
System.out.println("RESTARTING GAME");
System.out.print(GameHub());
}
}
//Catches any lettered inputs and repeats the program
catch (Exception e) {
System.out.println("ERROR: IMPROPER DATA ENTERED. PLEASE INPUT NUMERIC VALUES ONLY.");
for (int i = 0; i < 5; ++i) System.out.println();
System.out.print(GameHub());
}
char blank = ' ';
return blank;
}
//HANGMAN CODE START. GO TO LINE 2880 TO SKIP.
public static char HangmanCustomMethod(){
Scanner input = new Scanner(System.in);
System.out.println("Let's play Hangman! (Code by Joshua Haas)\nPlease choose a difficulty. (1) Easy, (2) Medium, (3) Hard, (4) Impossible, "
+ "(5) Game Hub");
try{
int difficulty = input.nextInt();
String guess = null;
if (difficulty == 1){
double randomizer = Math.random() * 15;
System.out.println(EasyModeCustomMethod(guess, randomizer));
}
if (difficulty == 2){
double randomizer = Math.random() * 15;
System.out.println(MediumModeCustomMethod(guess, randomizer));
}
if (difficulty == 3){
double randomizer = Math.random() *15;
System.out.println(HardModeCustomMethod(guess,randomizer));
}
if (difficulty == 4){
for (int i = 0; i < 100; ++i) System.out.println();
System.out.println("Console Refreshed");
double randomizer = Math.random() * 15;
System.out.print(ImpossibleModeCustomMethod(guess, randomizer));
}
if (difficulty == 5){
for (int i = 0; i < 100; ++i) System.out.println();
System.out.println("Console Refreshed");
System.out.println(GameHub());
}
}
catch(Exception e){
System.out.println("ERROR: IMPROPER DATA ENTERED. PLEASE INPUT NUMERIC VALUES ONLY.");
for (int i = 0; i < 7; ++i) System.out.println();
System.out.print(HangmanCustomMethod());
}
char blank = ' ';
return blank;
}
//EasyMode Code Start
public static char EasyModeCustomMethod(String guess, double randomizer){
Scanner input = new Scanner(System.in);
int failurecount = 0; //gonna use this later
int Hangman = 0;
System.out.println("________________________________________________________________________________________");
System.out.println("|\t\t\t\tEasy Mode Enabled\t\t\t\t\t|");
System.out.println("|_______________________________________________________________________________________|");
System.out.println("(Please note, this program only takes in one letter at a time)");
//Create Array
char[] Easy;
Easy = null;
//Set number of integers
//Set Randomizer up so that different words are possible
if (randomizer > 0){
if (randomizer < 2.5){
Easy = new char [3];
//Give each set a value
Easy[0] = 68;
Easy[1] = 79;
Easy[2] = 71;
System.out.print("The word you are guessing is 3 lettered and is the name of a furry animal usually kept as a pet."
+ "\nPlease guess a letter for: ");
}
}
if (randomizer > 2.5){
if(randomizer < 5){
Easy = new char [3];
//Give each set a value
Easy[0] = 67;
Easy[1] = 65;
Easy[2] = 84;
System.out.print("The word you are guessing is 3 lettered and is the name of an animal with a lot of lives and is"
+ " usually kept as a pet. \nPlease guess a letter for: ");
}
}
if (randomizer > 5){
if (randomizer < 7.5){
Easy = new char [3];
//Give each set a value
Easy[0] = 74;
Easy[1] = 79;
Easy[2] = 66;
System.out.print("The word you are guessing is 3 lettered and is something where you get paid in exchange for work."
+ "\nPlease guess a letter for: ");
}
}
if (randomizer > 7.5){
if (randomizer < 10){
Easy = new char [3];
//Give each set a value
Easy[0] = 67;
Easy[1] = 85;
Easy[2] = 80;
System.out.print("The word you are guessing is 3 lettered and is something you usually drink water out of. "
+ "\nPlease guess a letter for: ");
}
}
if (randomizer > 10){
if (randomizer < 12.5){
Easy = new char [3];
//Give each set a value
Easy[0] = 71;
Easy[1] = 89;
Easy[2] = 77;
System.out.print("The word you are guessing is 3 lettered and is where people go to work out. "
+ "\nPlease guess a letter for: ");
}
}
if (randomizer > 12.5){
if (randomizer < 15){
Easy = new char [3];
//Give each set a value
Easy[0] = 87;
Easy[1] = 65;
Easy[2] = 88;
System.out.print("The word you are guessing is 3 lettered and is something that your ear makes on daily basis "
+ "\nPlease guess a letter for: ");
}
}
int[] EasyBlank;
//char[] Easy;
//Easy = new char [3];
EasyBlank = new int [3];
EasyBlank[0] = 42;
EasyBlank[1] = 42;
EasyBlank[2] = 42;
System.out.print(" *** > ");
guess = input.next();
System.out.print(EasyModeBlanksCustomMethod(guess, Easy, EasyBlank, failurecount, Hangman));
char blank = ' ';
return blank;
}
//Easy Mode Code continued
public static char EasyModeBlanksCustomMethod(String guess, char[] Easy, int[] EasyBlank, int failurecount, int Hangman){
//System.out.println("Easy Mode Blanks");
Scanner input = new Scanner(System.in);
char blank = ' ';
guess = guess.toUpperCase();
int EasyGuess = guess.charAt(0);
//Check if the letter given is equal to one of the values in the array
if (EasyGuess == Easy[0]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (EasyGuess == Easy[1]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (EasyGuess == Easy[2]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (EasyGuess == Easy[0]){
EasyBlank[0] = Easy[0];
System.out.print((char) EasyBlank[0]);
System.out.print((char) EasyBlank[1]);
System.out.print((char) EasyBlank[2]);
if (EasyBlank[1] == Easy[1]){
if (EasyBlank[2] == Easy[2]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(EasyModeBlanksCustomMethod(guess, Easy, EasyBlank, failurecount, Hangman));
}
if (EasyGuess == Easy[1]){
EasyBlank[1] = Easy[1];
System.out.print((char) EasyBlank[0]);
System.out.print((char) EasyBlank[1]);
System.out.print((char) EasyBlank[2]);
if (EasyBlank[0] == Easy[0]){
if (EasyBlank[2] == Easy[2]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(EasyModeBlanksCustomMethod(guess, Easy, EasyBlank, failurecount, Hangman));
}
if (EasyGuess == Easy[2]){
EasyBlank[2] = Easy[2];
System.out.print((char) EasyBlank[0]);
System.out.print((char) EasyBlank[1]);
System.out.print((char) EasyBlank[2]);
if (EasyBlank[0] == Easy[0]){
if (EasyBlank[1] == Easy[1]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(EasyModeBlanksCustomMethod(guess, Easy, EasyBlank, failurecount, Hangman));
}
int failure = 0;
if (EasyGuess != Easy[0]){
failure += 1;
}
if (EasyGuess != Easy[1]){
failure += 1;
}
if (EasyGuess != Easy[2]){
failure += 1;
}
if (failure <= 3){
failurecount += 1;
Hangman += 1;
System.out.print(HangmanManCustomMethod(Hangman));
System.out.print("Oh, sorry. There is no " + guess + " in the word.\nYou have failed "
+ failurecount + " times.\nGuess again for: ");
System.out.print((char) EasyBlank[0]);
System.out.print((char) EasyBlank[1]);
System.out.print((char) EasyBlank[2]);
guess = input.next();
System.out.print(EasyModeBlanksCustomMethod(guess, Easy, EasyBlank, failurecount, Hangman));
}
return blank;
}
//Difficulty Picker output. Allows you to pick the difficulty of words.
private static char[] DifficultyPickerCustomMethod(int failurecount) {
Scanner input = new Scanner(System.in);
System.out.println("\nHey! You got the word! "
+ "\nThanks for playing!");
if (failurecount > 0){
System.out.print("You only failed " + failurecount + " Times!");
}
if (failurecount > 10){
System.out.print("... You missed " + failurecount + " times... just... Wow. You must be some kinda special.");
}
if (failurecount == 0){
System.out.print("HOLY CRAP! YOU DIDN'T GET A SINLGE ONE WRONG! AMAZING!");
}
System.out.print("\nPick another difficulty? (1) Easy, (2) Medium, (3) Hard, (4) Impossible (5) Game Hub"
+"\nOr choose the same difficulty for a different word \n");
try{
int difficulty = input.nextInt();
String guess = null;
if (difficulty == 1){
for (int i = 0; i < 100; ++i) System.out.println();
System.out.println("Console Refreshed");
double randomizer = Math.random() * 15;
System.out.println(EasyModeCustomMethod(guess, randomizer));
}
if (difficulty == 2){
for (int i = 0; i < 100; ++i) System.out.println();
System.out.println("Console Refreshed");
double randomizer = Math.random() * 15;
System.out.println(MediumModeCustomMethod(guess, randomizer));
}
if (difficulty == 3){
for (int i = 0; i < 100; ++i) System.out.println();
System.out.println("Console Refreshed");
double randomizer = Math.random() * 15;
System.out.println(HardModeCustomMethod(guess, randomizer));
}
if (difficulty == 4){
for (int i = 0; i < 100; ++i) System.out.println();
System.out.println("Console Refreshed");
double randomizer = Math.random() * 15;
System.out.println(ImpossibleModeCustomMethod(guess, randomizer));
//TO DO: ADD IMPOSSIBLE MODE
}
if (difficulty == 5){
for (int i = 0; i < 100; ++i) System.out.println();
System.out.println("Console Refreshed");
System.out.println(GameHub());
}
}
catch(Exception e){
System.out.println("ERROR: IMPROPER DATA ENTERED. PLEASE INPUT NUMERIC VALUES ONLY.");
for (int i = 0; i < 3; ++i) System.out.println();
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
return null;
}
//Medium Mode Code Start
public static char MediumModeCustomMethod(String guess, double randomizer){
Scanner input = new Scanner(System.in);
int failurecount = 0; //gonna use this later
int Hangman = 0;
//Create Array
char[] Medium;
Medium = null;
System.out.println("________________________________________________________________________________________");
System.out.println("|\t\t\t\tMedium Mode Enabled\t\t\t\t\t|");
System.out.println("|_______________________________________________________________________________________|");
System.out.println("(Please note, this program only takes in one letter at a time)");
//Set number of integers
if (randomizer > 0){
if(randomizer < 2.5){
Medium = new char [5];
//Give each set a value
Medium[0] = 80;
Medium[1] = 73;
Medium[2] = 90;
Medium[3] = 90;
Medium[4] = 65;
System.out.print("The word you are guessing is 5 lettered and originated in Italy before transforming into an American classic typically served with toppings."
+ "\nPlease guess a letter for: ");
}
}
if (randomizer > 2.5){
if(randomizer < 5){
Medium = new char [5];
//Give each set a value
Medium[0] = 74;
Medium[1] = 65;
Medium[2] = 90;
Medium[3] = 90;
Medium[4] = 89;
System.out.print("The word you are guessing is 5 lettered and is a word one might use to describe jazz."
+ "\nPlease guess a letter for: ");
}
}
if (randomizer > 5){
if(randomizer < 7.5){
Medium = new char [5];
//Give each set a value
Medium[0] = 68;
Medium[1] = 73;
Medium[2] = 90;
Medium[3] = 90;
Medium[4] = 89;
System.out.print("The word you are guessing is 5 lettered and is a word one might use to describe if someone is spinning."
+ "\nPlease guess a letter for: ");
}
}
if (randomizer > 7.5){
if(randomizer < 10){
Medium = new char [5];
//Give each set a value
Medium[0] = 70;
Medium[1] = 73;
Medium[2] = 90;
Medium[3] = 90;
Medium[4] = 89;
System.out.print("The word you are guessing is 5 lettered and is a word one might use to describe a soft drink"
+ " with a ton of bubbles. \nPlease guess a letter for: ");
}
}
if (randomizer > 10){
if(randomizer < 12.5){
Medium = new char [5];
//Give each set a value
Medium[0] = 74;
Medium[1] = 73;
Medium[2] = 77;
Medium[3] = 77;
Medium[4] = 89;
System.out.print("The word you are guessing is 5 lettered and is the name of a character on Better Call Saul."
+ "\nPlease guess a letter for: ");
}
}
if (randomizer > 12.5){
if(randomizer < 15){
Medium = new char [5];
//Give each set a value
Medium[0] = 74;
Medium[1] = 73;
Medium[2] = 71;
Medium[3] = 71;
Medium[4] = 89;
System.out.print("The word you are guessing is 5 lettered and is an old term for someone who is well dressed or looks good."
+ "\nPlease guess a letter for: ");
}
}
int[] MediumBlank;
//Create Blank Array
MediumBlank = new int [5];
MediumBlank[0] = 42;
MediumBlank[1] = 42;
MediumBlank[2] = 42;
MediumBlank[3] = 42;
MediumBlank[4] = 42;
System.out.print(" ***** > ");
guess = input.next();
System.out.print(MediumModeBlanksCustomMethod(guess, Medium, MediumBlank, failurecount, Hangman));
char blank = ' ';
return blank;
}
//Medium Code continued
public static char MediumModeBlanksCustomMethod(String guess, char[] Medium, int[] MediumBlank, int failurecount, int Hangman){
//System.out.println("Medium Mode Blanks");
Scanner input = new Scanner(System.in);
char blank = ' ';
guess = guess.toUpperCase();
int MediumGuess = guess.charAt(0);
//Check if the letter given is equal to one of the values in the array
if (MediumGuess == Medium[0]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (MediumGuess == Medium[1]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (MediumGuess == Medium[2]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (MediumGuess == Medium[3]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (MediumGuess == Medium[4]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (MediumGuess == Medium[0]){
MediumBlank[0] = Medium[0];
System.out.print((char) MediumBlank[0]);
System.out.print((char) MediumBlank[1]);
System.out.print((char) MediumBlank[2]);
System.out.print((char) MediumBlank[3]);
System.out.print((char) MediumBlank[4]);
if (MediumBlank[1] == Medium[1]){
if (MediumBlank[2] == Medium[2]){
if (MediumBlank[3] == Medium[3]){
if (MediumBlank[4] == Medium[4]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(MediumModeBlanksCustomMethod(guess, Medium, MediumBlank, failurecount, Hangman));
}
if (MediumGuess == Medium[1]){
MediumBlank[1] = Medium[1];
System.out.print((char) MediumBlank[0]);
System.out.print((char) MediumBlank[1]);
System.out.print((char) MediumBlank[2]);
System.out.print((char) MediumBlank[3]);
System.out.print((char) MediumBlank[4]);
if (MediumBlank[0] == Medium[0]){
if (MediumBlank[2] == Medium[2]){
if (MediumBlank[3] == Medium[3]){
if (MediumBlank[4] == Medium[4]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(MediumModeBlanksCustomMethod(guess, Medium, MediumBlank, failurecount, Hangman));
}
if (MediumGuess == Medium[2]){
MediumBlank[2] = Medium[2];
MediumBlank[3] = Medium[3];
System.out.print((char) MediumBlank[0]);
System.out.print((char) MediumBlank[1]);
System.out.print((char) MediumBlank[2]);
System.out.print((char) MediumBlank[3]);
System.out.print((char) MediumBlank[4]);
if (MediumBlank[0] == Medium[0]){
if (MediumBlank[1] == Medium[1]){
if (MediumBlank[4] == Medium[4]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(MediumModeBlanksCustomMethod(guess, Medium, MediumBlank, failurecount, Hangman));
}
if (MediumGuess == Medium[3]){
MediumBlank[3] = Medium[3];
System.out.print((char) MediumBlank[0]);
System.out.print((char) MediumBlank[1]);
System.out.print((char) MediumBlank[2]);
System.out.print((char) MediumBlank[3]);
System.out.print((char) MediumBlank[4]);
if (MediumBlank[0] == Medium[0]){
if (MediumBlank[1] == Medium[1]){
if (MediumBlank[2] == Medium[2]){
if (MediumBlank[4] == Medium[4]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(MediumModeBlanksCustomMethod(guess, Medium, MediumBlank, failurecount, Hangman));
}
if (MediumGuess == Medium[4]){
MediumBlank[4] = Medium[4];
System.out.print((char) MediumBlank[0]);
System.out.print((char) MediumBlank[1]);
System.out.print((char) MediumBlank[2]);
System.out.print((char) MediumBlank[3]);
System.out.print((char) MediumBlank[4]);
if (MediumBlank[0] == Medium[0]){
if (MediumBlank[1] == Medium[1]){
if (MediumBlank[2] == Medium[2]){
if (MediumBlank[3] == Medium[3]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(MediumModeBlanksCustomMethod(guess, Medium, MediumBlank, failurecount, Hangman));
}
int failure = 0;
if (MediumGuess != Medium[0]){
failure += 1;
}
if (MediumGuess != Medium[1]){
failure += 1;
}
if (MediumGuess != Medium[2]){
failure += 1;
}
if (MediumGuess != Medium[3]){
failure +=1;
}
if (MediumGuess != Medium[4]){
failure +=1;
}
if (failure <= 5){
failurecount += 1;
Hangman += 1;
System.out.print(HangmanManCustomMethod(Hangman));
System.out.print("Oh, sorry. There is no " + guess + " in the word.\nYou have failed "
+ failurecount + " times.\nGuess again for: ");
System.out.print((char) MediumBlank[0]);
System.out.print((char) MediumBlank[1]);
System.out.print((char) MediumBlank[2]);
System.out.print((char) MediumBlank[3]);
System.out.print((char) MediumBlank[4]);
guess = input.next();
System.out.print(MediumModeBlanksCustomMethod(guess, Medium, MediumBlank, failurecount, Hangman));
}
return blank;
}
//Hard Mode Code Start
public static char HardModeCustomMethod(String guess, double randomizer){
Scanner input = new Scanner(System.in);
int failurecount = 0; //gonna use this later
int Hangman = 0;
//Create Array
char[] Hard;
Hard = null;
System.out.println("________________________________________________________________________________________");
System.out.println("|\t\t\t\tHard Mode Enabled\t\t\t\t\t|");
System.out.println("|_______________________________________________________________________________________|");
System.out.println("(Please note, this program only takes in one letter at a time)");
//Set number of integers
//Code for word LUMBERJACK
if (randomizer > 0){
if(randomizer < 3.75){
Hard = new char [10];
//Give each set a value
Hard[0] = 76;
Hard[1] = 85;
Hard[2] = 77;
Hard[3] = 66;
Hard[4] = 69;
Hard[5] = 82;
Hard[6] = 74;
Hard[7] = 65;
Hard[8] = 67;
Hard[9] = 75;
System.out.print("The word you are guessing is 10 lettered and describes someone who cuts down trees for a living."
+ "\nPlease guess a letter for: ");
}
}
//Code for word QUIZMASTER
if (randomizer > 3.75){
if(randomizer < 7.5){
Hard = new char [10];
//Give each set a value
Hard[0] = 81;
Hard[1] = 85;
Hard[2] = 73;
Hard[3] = 90;
Hard[4] = 77;
Hard[5] = 65;
Hard[6] = 83;
Hard[7] = 84;
Hard[8] = 69;
Hard[9] = 82;
System.out.print("The word you are guessing is 10 lettered and is a word used to describe someone who gives questions."
+ "\nPlease guess a letter for: ");
}
}
//Code for word JARGONIZED
if (randomizer > 7.5){
if(randomizer < 11.25){
Hard = new char [10];
//Give each set a value
Hard[0] = 74;
Hard[1] = 65;
Hard[2] = 82;
Hard[3] = 71;
Hard[4] = 79;
Hard[5] = 78;
Hard[6] = 73;
Hard[7] = 90;
Hard[8] = 69;
Hard[9] = 68;
System.out.print("The word you are guessing is 10 lettered and is the past tense of a word which means 'to make in a"
+ " confused an unintelligble way."
+ "\nPlease guess a letter for: ");
}
}
//Code for word JACKLIGHTS
if (randomizer > 11.25){
if(randomizer < 15){
Hard = new char [10];
//Give each set a value
Hard[0] = 74;
Hard[1] = 65;
Hard[2] = 67;
Hard[3] = 75;
Hard[4] = 76;
Hard[5] = 73;
Hard[6] = 71;
Hard[7] = 72;
Hard[8] = 84;
Hard[9] = 83;
System.out.print("The word you are guessing is 10 lettered and is... I don't even know "
+ "how to describe this man, 'a portable cresset, oil-burning lantern' oh and it's in plural form."
+ "\nPlease guess a letter for: ");
}
}
int[] HardBlank;
//Create Blank Array
HardBlank = new int [10];
HardBlank[0] = 42;
HardBlank[1] = 42;
HardBlank[2] = 42;
HardBlank[3] = 42;
HardBlank[4] = 42;
HardBlank[5] = 42;
HardBlank[6] = 42;
HardBlank[7] = 42;
HardBlank[8] = 42;
HardBlank[9] = 42;
System.out.print(" ********** > ");
guess = input.next();
System.out.print(HardModeBlanksCustomMethod(guess, Hard, HardBlank, failurecount, Hangman));
char blank = ' ';
return blank;
}
//Hard Mode Code continued
public static char HardModeBlanksCustomMethod(String guess, char[] Hard, int[] HardBlank, int failurecount, int Hangman){
//System.out.println("Hard Mode Blanks");
Scanner input = new Scanner(System.in);
char blank = ' ';
guess = guess.toUpperCase();
int HardGuess = guess.charAt(0);
//Check if the letter given is equal to one of the values in the array
if (HardGuess == Hard[0]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (HardGuess == Hard[1]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (HardGuess == Hard[2]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (HardGuess == Hard[3]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (HardGuess == Hard[4]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (HardGuess == Hard[5]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (HardGuess == Hard[6]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (HardGuess == Hard[7]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (HardGuess == Hard[8]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (HardGuess == Hard[9]){
System.out.println("Correct! There is a " + guess + "!");
System.out.print("Please guess a letter for: ");
}
if (HardGuess == Hard[0]){
HardBlank[0] = Hard[0];
System.out.print((char) HardBlank[0]);
System.out.print((char) HardBlank[1]);
System.out.print((char) HardBlank[2]);
System.out.print((char) HardBlank[3]);
System.out.print((char) HardBlank[4]);
System.out.print((char) HardBlank[5]);
System.out.print((char) HardBlank[6]);
System.out.print((char) HardBlank[7]);
System.out.print((char) HardBlank[8]);
System.out.print((char) HardBlank[9]);
if (HardBlank[1] == Hard[1]){
if (HardBlank[2] == Hard[2]){
if (HardBlank[3] == Hard[3]){
if (HardBlank[4] == Hard[4]){
if (HardBlank[5] == Hard[5]){
if (HardBlank[6] == Hard[6]){
if (HardBlank[7] == Hard[7]){
if (HardBlank[8] == Hard[8]){
if (HardBlank[9] == Hard[9]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
}
}
}
}
}
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(HardModeBlanksCustomMethod(guess, Hard, HardBlank, failurecount, Hangman));
}
if (HardGuess == Hard[1]){
HardBlank[1] = Hard[1];
System.out.print((char) HardBlank[0]);
System.out.print((char) HardBlank[1]);
System.out.print((char) HardBlank[2]);
System.out.print((char) HardBlank[3]);
System.out.print((char) HardBlank[4]);
System.out.print((char) HardBlank[5]);
System.out.print((char) HardBlank[6]);
System.out.print((char) HardBlank[7]);
System.out.print((char) HardBlank[8]);
System.out.print((char) HardBlank[9]);
if (HardBlank[0] == Hard[0]){
if (HardBlank[2] == Hard[2]){
if (HardBlank[3] == Hard[3]){
if (HardBlank[4] == Hard[4]){
if (HardBlank[5] == Hard[5]){
if (HardBlank[6] == Hard[6]){
if (HardBlank[7] == Hard[7]){
if (HardBlank[8] == Hard[8]){
if (HardBlank[9] == Hard[9]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
}
}
}
}
}
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(HardModeBlanksCustomMethod(guess, Hard, HardBlank, failurecount, Hangman));
}
if (HardGuess == Hard[2]){
HardBlank[2] = Hard[2];
System.out.print((char) HardBlank[0]);
System.out.print((char) HardBlank[1]);
System.out.print((char) HardBlank[2]);
System.out.print((char) HardBlank[3]);
System.out.print((char) HardBlank[4]);
System.out.print((char) HardBlank[5]);
System.out.print((char) HardBlank[6]);
System.out.print((char) HardBlank[7]);
System.out.print((char) HardBlank[8]);
System.out.print((char) HardBlank[9]);
if (HardBlank[0] == Hard[0]){
if (HardBlank[1] == Hard[1]){
if (HardBlank[3] == Hard[3]){
if (HardBlank[4] == Hard[4]){
if (HardBlank[5] == Hard[5]){
if (HardBlank[6] == Hard[6]){
if (HardBlank[7] == Hard[7]){
if (HardBlank[8] == Hard[8]){
if (HardBlank[9] == Hard[9]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
}
}
}
}
}
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(HardModeBlanksCustomMethod(guess, Hard, HardBlank, failurecount, Hangman));
}
if (HardGuess == Hard[3]){
HardBlank[3] = Hard[3];
System.out.print((char) HardBlank[0]);
System.out.print((char) HardBlank[1]);
System.out.print((char) HardBlank[2]);
System.out.print((char) HardBlank[3]);
System.out.print((char) HardBlank[4]);
System.out.print((char) HardBlank[5]);
System.out.print((char) HardBlank[6]);
System.out.print((char) HardBlank[7]);
System.out.print((char) HardBlank[8]);
System.out.print((char) HardBlank[9]);
if (HardBlank[0] == Hard[0]){
if (HardBlank[1] == Hard[1]){
if (HardBlank[2] == Hard[2]){
if (HardBlank[4] == Hard[4]){
if (HardBlank[5] == Hard[5]){
if (HardBlank[6] == Hard[6]){
if (HardBlank[7] == Hard[7]){
if (HardBlank[8] == Hard[8]){
if (HardBlank[9] == Hard[9]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
}
}
}
}
}
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(HardModeBlanksCustomMethod(guess, Hard, HardBlank, failurecount, Hangman));
}
if (HardGuess == Hard[4]){
HardBlank[4] = Hard[4];
System.out.print((char) HardBlank[0]);
System.out.print((char) HardBlank[1]);
System.out.print((char) HardBlank[2]);
System.out.print((char) HardBlank[3]);
System.out.print((char) HardBlank[4]);
System.out.print((char) HardBlank[5]);
System.out.print((char) HardBlank[6]);
System.out.print((char) HardBlank[7]);
System.out.print((char) HardBlank[8]);
System.out.print((char) HardBlank[9]);
if (HardBlank[0] == Hard[0]){
if (HardBlank[1] == Hard[1]){
if (HardBlank[2] == Hard[2]){
if (HardBlank[3] == Hard[3]){
if (HardBlank[5] == Hard[5]){
if (HardBlank[6] == Hard[6]){
if (HardBlank[7] == Hard[7]){
if (HardBlank[8] == Hard[8]){
if (HardBlank[9] == Hard[9]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
}
}
}
}
}
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(HardModeBlanksCustomMethod(guess, Hard, HardBlank, failurecount, Hangman));
}
if (HardGuess == Hard[5]){
HardBlank[5] = Hard[5];
System.out.print((char) HardBlank[0]);
System.out.print((char) HardBlank[1]);
System.out.print((char) HardBlank[2]);
System.out.print((char) HardBlank[3]);
System.out.print((char) HardBlank[4]);
System.out.print((char) HardBlank[5]);
System.out.print((char) HardBlank[6]);
System.out.print((char) HardBlank[7]);
System.out.print((char) HardBlank[8]);
System.out.print((char) HardBlank[9]);
if (HardBlank[0] == Hard[0]){
if (HardBlank[1] == Hard[1]){
if (HardBlank[2] == Hard[2]){
if (HardBlank[3] == Hard[3]){
if (HardBlank[4] == Hard[4]){
if (HardBlank[6] == Hard[6]){
if (HardBlank[7] == Hard[7]){
if (HardBlank[8] == Hard[8]){
if (HardBlank[9] == Hard[9]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}
}
}
}
}
}
}
}
}
System.out.print(" > ");
guess = input.next();
System.out.print(HardModeBlanksCustomMethod(guess, Hard, HardBlank, failurecount, Hangman));
}
if (HardGuess == Hard[6]){
HardBlank[6] = Hard[6];
System.out.print((char) HardBlank[0]);
System.out.print((char) HardBlank[1]);
System.out.print((char) HardBlank[2]);
System.out.print((char) HardBlank[3]);
System.out.print((char) HardBlank[4]);
System.out.print((char) HardBlank[5]);
System.out.print((char) HardBlank[6]);
System.out.print((char) HardBlank[7]);
System.out.print((char) HardBlank[8]);
System.out.print((char) HardBlank[9]);
if (HardBlank[0] == Hard[0]){
if (HardBlank[1] == Hard[1]){
if (HardBlank[2] == Hard[2]){
if (HardBlank[3] == Hard[3]){
if (HardBlank[4] == Hard[4]){
if (HardBlank[5] == Hard[5]){
if (HardBlank[7] == Hard[7]){
if (HardBlank[8] == Hard[8]){
if (HardBlank[9] == Hard[9]){
System.out.print(DifficultyPickerCustomMethod(failurecount));
}