Exemplo n.º 1
0
        static void Main(string[] args)
        {
            List <NumWithList> numList = NumWithList.GenerateInitialList(100, 5, 2, new Random());
            DisplayController  a       = new DisplayController(numList);

            a.StartConsoleDialog();
        }
Exemplo n.º 2
0
 private void GenerateNewList(string[] commands)
 {
     int[] providedVariables = new int[3];
     for (int i = 0; i < 3; i++)
     {
         //If provided variables aren't integers, abort command
         if (!int.TryParse(commands[i + 1], out providedVariables[i]))
         {
             Console.WriteLine("Provided variables need to be integers. Generation aborted.");
             return;
         }
     }
     list = NumWithList.GenerateInitialList(providedVariables[0], providedVariables[1], providedVariables[2], new Random());
     Console.WriteLine("New list generated.");
 }