Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class MLApp
- {
- public static void main (String [] args)
- {
- Scanner input = new Scanner(System.in);
- MLServer server = new MLServer();
- int choice = 0;
- String menuchoice = "";
- String menu = "";
- menu += "1) A Sailing Trip\n";
- System.out.println("Welcome to MadLibber!");
- System.out.println("Type (m) for story menu, (s) for a story, or (x) to exit.");
- System.out.print(">");
- menuchoice = input.nextLine();
- switch (menuchoice)
- {
- case "m":
- System.out.println(menu);
- case "s":
- System.out.println("Choose a story!");
- System.out.print(">");
- choice = input.nextInt();
- server.chooseStory(choice);
- break;
- case "x":
- System.exit(0);
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement