Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private boolean processCommand(Command command)
- {
- boolean wantToQuit = false;
- if(command.isUnknown()) {
- System.out.println("I don't know what you mean...");
- return false;
- }
- String commandWord = command.getCommandWord();
- if (commandWord.equals("help"))
- printHelp();
- else if (commandWord.equals("go"))
- goRoom(command);
- else if (commandWord.equals("look"))
- look();
- else if (commandWord.equals("quit"))
- wantToQuit = quit(command);
- else if (commandWord.equals("defuse"))
- defuse();
- return wantToQuit;
- }
Add Comment
Please, Sign In to add comment