-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHeadlessHorseman.java
More file actions
48 lines (38 loc) · 1.15 KB
/
HeadlessHorseman.java
File metadata and controls
48 lines (38 loc) · 1.15 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
import java.util.Random;
import java.io.*;
public class HeadlessHorseman {
public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args){
ConsoleProgressBar x = new ConsoleProgressBar();
Girls g = new Girls();
Story s = new Story();
Race r = new Race();
x.Progress();
s.Backstory();
g.Like();
Character c = s.Input();
while (!c.equals('n')){
g.Like();
c = s.Input();
}
s.MoreStory();
int score = r.ChaseObstacles();
try
{
Thread.sleep(1000);
}
catch(InterruptedException ex)
{
Thread.currentThread().interrupt();
}
x.Progress();
if (score > 0) {
System.out.println("You escaped the headless horseman");
System.out.println("Your final score is: " + score);
}
else {
System.out.println("The headless horseman captured and killed you");
System.out.println("Your final score is: " + score);
}
}
}