Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void startGame() {
- Scanner scanner = new Scanner(System.in);
- boolean exit = false;
- while (!exit) {
- System.out.println("Enter command ('quit' to exit):");
- String input = scanner.nextLine();
- if(input != null) {
- console("Your input is : " + input);
- if (input.equalsIgnoreCase("quit")) {
- exit = true;
- } else if (input.equalsIgnoreCase("quit")) {
- console("Starting game...");
- delay(1000);
- TypeHandler.continueGame();
- } else {
- console("Say again??");
- }
- }
- }
- scanner.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement