static void Main(string[] args) { System.Threading.Thread.CurrentThread.Name = "Console Thread"; logger = new ConsoleLogger(); Console.CancelKeyPress += new ConsoleCancelEventHandler(Console_CancelKeyPress); worker = new BackgroundWorker(); worker.WorkerSupportsCancellation = false; worker.DoWork += new DoWorkEventHandler(worker_DoWork); worker.RunWorkerAsync(); string line = Console.ReadLine(); while (line != "q" && line != "quit" && line != "exit") { if (line == "e") { game.FlippersEnabled = true; } if (line == "d") { game.FlippersEnabled = false; } if (line == "r") { game.PROC.reset(1); } if (line == "o") { game.open_divertor(); } if (line == "c") { game.close_divertor(); } if (line == "b") { game.Coils["bottomPopper"].Pulse(); } if (line == "t") { game.Coils["topPopper"].Pulse(); } line = Console.ReadLine(); } }