-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNavigation.java
More file actions
53 lines (42 loc) · 1.12 KB
/
Navigation.java
File metadata and controls
53 lines (42 loc) · 1.12 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
public class Navigation extends Main {
static Integer currentLocation;
static Integer previousLocation;
// OPTIONS FOR NEXT LOCATION BASED ON CURRENT LOCATION
public void goLeft(Integer currentLocation) {
if (currentLocation == 1) {
previousLocation = currentLocation;
}
/*else if (currentLocation == "Plane Crash") {
return option1 = "Go to River";
}
else if (currentLocation == "River") {
return option1 = "Go to Beach";
}
else if (currentLocation == "Beach") {
return option1 = "Go to River";
}
else if (currentLocation == "Jungle") {
return option1 = "Go to Cave";
}
return option1;*/
}
public String goRight(Integer currentLocation) {
//String option2 = " ";
if (currentLocation == "Menu") {
return option2 = "Load Game";
}
else if (currentLocation == "Plane Crash") {
return option2 = "Go to Jungle";
}
else if (currentLocation == "River") {
return option2 = " ";
}
else if (currentLocation == "Beach") {
return option2 = " ";
}
else if (currentLocation == "Jungle") {
return option2 = "Go to Village";
}
return option2;
}
}