forked from aryanch22/PlanetHoppingGame
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRoomTwoInput.java
More file actions
80 lines (71 loc) · 2.55 KB
/
RoomTwoInput.java
File metadata and controls
80 lines (71 loc) · 2.55 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
import java.util.*;
import java.io.*;
/**
* Write a description of class RoomTwoInput here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class RoomTwoInput
{
public void R2() throws Exception{
PlanetHades Hades = new PlanetHades();
PlanetHades.RoomTwo walk = Hades.new RoomTwo();
Commands I = new Commands();
UserBattleRoomOne firstRound = new UserBattleRoomOne();
//Reads the monsters dialog file
walk.readMonsterFile();
//The assistant tells the player a monster is close by
do{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String userInput = reader.readLine();
userInput = userInput.toLowerCase();
if(userInput.contains("talk")){
walk.assistant();
}else if(userInput.contains("inventory")){
I.Inventory();
}else if(userInput.contains("forward")){
break;
}else{
System.out.println("you should keep moving");
}
}while(true);
walk.StartBattle();
firstRound.SimBattle(walk);
walk.readRoomFile();
do{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String userInput = reader.readLine();
userInput = userInput.toLowerCase();
if(userInput.contains("talk")){
walk.readCharacterFile();
break;
}else{
System.out.println("try talking to the old man");
}
}while(true);
do{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String userInput = reader.readLine();
userInput = userInput.toLowerCase();
if(userInput.contains("ask")){
walk.Ask("Ask");
break;
}else{
System.out.println("try asking the old man about the planet");
}
}while(true);
walk.Boom();
do{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String userInput = reader.readLine();
userInput = userInput.toLowerCase();
if(userInput.contains("run")){
walk.Run();
break;
}else{
System.out.println("you better run back");
}
}while(true);
}
}