document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /**
  2.  * Class CommandWords here.
  3.  *
  4.  */
  5.  
  6. public class CommandWords
  7. {
  8.     private static final String[] validCommands = {"go", "quit", "help"};
  9.    
  10.     public CommandWords()
  11.     {
  12.     }
  13.    
  14.     public boolean isCommand(String aString)
  15.     {
  16.         for(int i=0; i < validCommands.length; i++)
  17.         {
  18.             if(validCommands[i].equals(aString))
  19.             {
  20.                 return true;
  21.             }  
  22.         }
  23.         return false;
  24.     }
  25. }
');