Exemple #1
0
    /// <summary>
    /// We have a commandString (which is apparently a list of commands [of which Chat's are commands too])
    /// </summary>
    /// <param name="commandString"></param>
    public void xLoadMatchstateCommands(string commandSetText)
    {
        commandController.LoadCommandSet(commandSetText);

        /*
         * using (var sr = new StringReader(commandSetText))
         * {
         *  string line;
         *  int count = 0;
         *  int numlines = 0;
         *  while ((line = sr.ReadLine()) != null)
         *  {
         *      numlines++;
         *      Command command = CommandFactory.Make(line);
         *      if (command != null)
         *      {
         *          //matchstate = command.Execute(matchstate);
         *          // Create the text for a LogCommand
         *          // TODO:   These commands are being discarded. They should be loaded into Log.  Execute should not be run here (at least not for the new turn)
         *          //Bopper.LogItem logitem = LogItemFactory.MakeLogItem(command);
         *          logWindow.Add(command);
         *          count++;
         *      }
         *  }
         *
         *  Debug.Log($"Commands: {count}/{numlines} parsed\n");
         * }
         */
    }