Esempio n. 1
0
 public void ExecuteAction(string exec, ref Player player)
 {
     if (verbs.ContainsKey(exec))
     {
         var    commandStr = verbs[exec];
         char[] delimiters = { ',' };
         var    actions    = commandStr.Split(delimiters);
         foreach (var action in actions)
         {
             char[] actionDel = { ' ' };
             var    commands  = action.Split(actionDel,
                                             StringSplitOptions.RemoveEmptyEntries); Console.WriteLine("Executing: ");
             foreach (var command in commands)
             {
                 Console.Write(command + ", ");
             }
             ast.Execute(ref commands, ref player, nouns);
         }
     }
 }