static public void Main(string[] args) { int verbosity = 0; for (int i = 0; i < args.Length; i++) { if (args[i] == "-v") { verbosity = 1; if (i + 1 < args.Length) { try { verbosity = Int32.Parse(args[i + 1]); } catch {} } } } Magellan m = new Magellan(verbosity); bool exiting = false; while (!exiting) { string user_in = System.Console.ReadLine(); if (user_in == "exit") { System.Console.WriteLine("stopping"); m.ShutDown(); exiting = true; } } }
public static void Main(string[] args) { int verbosity = 0; for(int i=0;i<args.Length;i++){ if (args[i] == "-v"){ verbosity = 1; if (i+1 < args.Length){ try { verbosity = Int32.Parse(args[i+1]); } catch{} } } } Magellan m = new Magellan(verbosity); bool exiting = false; while(!exiting){ string user_in = System.Console.ReadLine(); if (user_in == "exit"){ System.Console.WriteLine("stopping"); m.ShutDown(); exiting = true; } } }
public static void Main() { Magellan m = new Magellan(); bool exiting = false; while(!exiting){ string user_in = System.Console.ReadLine(); if (user_in == "exit"){ System.Console.WriteLine("stopping"); m.ShutDown(); exiting = true; } } }