Exemplo n.º 1
0
 public static void PLay()
 {
     while (quit == false)
     {
         Commands     com          = parser.words2();
         CommandWords commandWords = parser.words2();
         parscom(, com);
     }
 }
Exemplo n.º 2
0
        public static void parscom(CommandWords commandWords, Commands command)
        {
            if (commandWords.isvalid(command) == false)
            {
                Console.WriteLine("That is not a valid command.");
            }
            String CommandWord = command.getCommandWord();

            if (CommandWord == "walk")
            {
                walk(command);
            }
            if (CommandWord == "look")
            {
                look();
            }
            if (CommandWord == "take")
            {
                take();
            }
            if (CommandWord == "help")
            {
            }
        }
Exemplo n.º 3
0
 public Parser()
 {
     CW = new CommandWords();
 }