static async Task Main(string[] args)
 {
     var input = new TextInput();
     var gui   = new ConsoleGUI()
     {
         Input = input
     };
     var sim = new MySimulation(gui, input);
     await gui.Start(sim);
 }
Beispiel #2
0
 public void ExecuteCommand(string commandToExecute, MySimulation simulation)
 {
     try
     {
         int commandIndex = int.Parse(commandToExecute) - 1;
         writer.ListOfCommands[commandIndex].Execute(simulation);
     }
     catch
     {
         logForBakeryRelatedUpdates.Log("Invalid command (" + commandToExecute + "), please try again");
     }
 }