Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. public static void startGame() {
  2.          Scanner scanner = new Scanner(System.in);
  3.          boolean exit = false;
  4.          while (!exit) {
  5.              System.out.println("Enter command ('quit' to exit):");
  6.              String input = scanner.nextLine();
  7.              if(input != null) {
  8.                  console("Your input is : " + input);
  9.                  if (input.equalsIgnoreCase("quit")) {
  10.                      exit = true;
  11.                  } else if (input.equalsIgnoreCase("quit")) {
  12.                      console("Starting game...");
  13.                      delay(1000);
  14.                      TypeHandler.continueGame();
  15.                  } else {
  16.                      console("Say again??");
  17.                  }
  18.              }
  19.          }
  20.          scanner.close();
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement