-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
55 lines (49 loc) · 1.61 KB
/
Main.java
File metadata and controls
55 lines (49 loc) · 1.61 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
import java.io.*;
class Main
{
void main(boolean showCode)throws Exception
{
Fill.logo();
menu(showCode);
}
void menu(boolean showCode) throws Exception
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String x="";
DifficultyLevel diffLevel = new DifficultyLevel();
while (true)
{
System.out.println("Choose one of the following:");
do
{
System.out.println("\t\t1.Play!!!\n\t\t2.How to Play???\n\t\t3.Difficulty..:-o");
System.out.print("\t\t4.About..:-D\n\t\t5.Quit..-X-..\n\t\t\t");
x = br.readLine();
x = x.trim();
}
while(!x.equals("1")&&!x.equals("2")&&!x.equals("3")&&!x.equals("4")&&!x.equals("5"));
char c = x.charAt(0);
switch(c)
{
case '1':
Play play = new Play(showCode, diffLevel);
play.runGames();
break;
case '2':
HowToPlay.display();
break;
case '3':
diffLevel.setLevel();
break;
case '4':
System.out.print("\u000C");
About.display();
break;
case '5':
System.out.print("\u000C");
System.out.print("Press X on the Window");
System.exit(0);
}
}
}
}