Beispiel #1
0
        static void Main(string[] args)
        {
            if (args.Count() == 0)
            {
                RunSample();
            }
            switch( args[0].ToLower()) {
                case "/f":
                    CommandEnvironment commandEnv = new CommandEnvironment();
                    commandEnv.Run(RunFile(args[1])); // /f <filenam>
                    break;

                case "/h":
                case "/?":
                    ShowHelp();
                    break;
            }
        }
Beispiel #2
0
 static void RunSample()
 {
     string[] commands =
     {
         "Report",
         "Place 2,2,West",
         "Report",
         "Move",
         "Open Pod Bay Doors",
         "Report",
         "Place 3, 3, South",
         "Report",
         "Left",
         "Move",
         "Exterminate",
         "Report"
     };
     CommandEnvironment commandEnv = new CommandEnvironment();
     commandEnv.Run(commands.ToList());
 }