示例#1
0
        private static void RunSimulator()
        {
            var counter = 0;

            var input = Console.ReadLine();

            while (input != "quit")
            {
                if (input == "index")
                {
                    SimpleSimulator.PrintIndex();
                    Console.WriteLine();
                    Console.WriteLine("Press Enter to continue or type quit to exit");
                    input = Console.ReadLine();
                }
                else
                {
                    counter++;
                    List <Data> foodList     = new List <Data>();
                    List <Data> exerciseList = new List <Data>();

                    GetInput(ref foodList, ref exerciseList, counter);

                    SimpleSimulator.Simulate(foodList, exerciseList, counter);
                    Console.WriteLine(String.Format("Simulation COMPLETED for input dataset {0}. Press Enter to continue or type quit to exit", counter));
                    input = Console.ReadLine();
                }
            }
        }
示例#2
0
        private static bool Init()
        {
            /*Failures would have been logged by dependent components */
            /*Logging will be done here also for the SugarSimulator exe that it failed to run */

            return(SimpleSimulator.Init());
        }