zuul5
This commit is contained in:
@@ -15,7 +15,7 @@ public class CommandWords
|
||||
{
|
||||
// a constant array that holds all valid command words
|
||||
private static final String[] validCommands = {
|
||||
"go", "quit", "help"
|
||||
"go", "quit", "help", "look"
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -40,4 +40,14 @@ public class CommandWords
|
||||
// if we get here, the string was not found in the commands
|
||||
return false;
|
||||
}
|
||||
public String showAll()
|
||||
{
|
||||
StringBuilder exitsInString = new StringBuilder();
|
||||
|
||||
for (String validCommands : validCommands){
|
||||
exitsInString.append(validCommands).append(" ");
|
||||
}
|
||||
|
||||
return exitsInString.toString().trim();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user