示例#1
0
 public static void PLay()
 {
     while (quit == false)
     {
         Commands     com          = parser.words2();
         CommandWords commandWords = parser.words2();
         parscom(, com);
     }
 }
示例#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")
            {
            }
        }
示例#3
0
 public Parser()
 {
     CW = new CommandWords();
 }