Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while (hangman.gameOn()) {
- System.out.println("Type a command: ");
- String command = reader.nextLine();
- if (command == "quit") {
- break;
- } else if (command == "status") {
- hangman.printStatus();
- } else if (command.length() == 1) {
- hangman.guess(command);
- } else if (command.isEmpty()) {
- System.out.println("String was empty");
- } else {
- System.out.println("I found something!");
- }
- hangman.printMan();
- hangman.printWord();
- }
- System.out.println("Thank you for playing!");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement