So I'm working on a class project, which is making a branching storyline game. Here's what I have:
System.out.println("Welcome to _____. \nThe way you play this game is by typing your response exactly as shown in the question.\n\nGood luck.\n\n\nYou wake up in a dark room. \nWhat would you like to do? \n(search for a light switch, cry, wait it out)");
String response1 = input.next();
switch (response1) {
case "search for a light switch": PathOne.main(args);
break;
case "wait it out":
break;
case "cry": System.out.println("Weak. You cry yourself to death. Good going. This is the end for you.");
As you see, I'm trying to essentially simplify the main class by utilizing other classes. I may be doing this TOTALLY wrong, as I called my other class "PathOne" and had some text for it to print out, which it didn't. Is there any way to kind of move from one class to another entirely once a certain choice is chosen? Or, how should I be inserting my classes so that the storyline inside that class plays out?