public static void Count(ICountable c, int maxCount)
 {
     for (int i = 0; i < maxCount; i++)
     {
         c.IncrementCount();
         Console.WriteLine($"{c.GetCountString()}");
     }
 }
Beispiel #2
0
 public static void Count(ICountable c, int MaxCount)
 {
     while (c.GetCount() <= MaxCount)
     {
         Console.WriteLine(c.GetCountString() + " " + c.Name);
         c.IncrementCount();
     }
 }
Beispiel #3
0
 public static void Count(ICountable c, int MaxCount)
 {
     Console.WriteLine("");
     for (; c.GetCount() <= MaxCount; c.IncrementCount())
     {
         Console.WriteLine(c.ToString());
     }
     c.ResetCount();
 }
 public static void Count(ICountable c, int maxCount)
 {//counts up to the specified max and prints each count
     while (c.GetCount() < maxCount)
     {
         c.IncrementCount();
         c.FormatCount();
         Thread.Sleep(500);
     }
     Console.WriteLine();
 }
Beispiel #5
0
        public static void Count(ICountable c, int maxCount)
        {
            for (int i = 1; i <= maxCount; i++)
            {
                c.IncrementCount();
                Console.WriteLine(c.GetCountString() + " " + c.Name + "\n");
            }

            c.ResetCount();
        }
Beispiel #6
0
 public void Count(ICountable c, int MaxCount)
 {
     Console.WriteLine($"Counting {c.GetType().Name}s:\n");
     for (int i = 0; i < MaxCount; i++)
     {
         c.IncrementCount();
         Console.WriteLine($"{c.GetCount()}. {c.ReturnName()}");
     }
     c.ResetCount();
     Console.WriteLine("");
 }
Beispiel #7
0
        public static void Count(ICountable e, int MaxCount)
        {
            int delay = 1000;

            for (int i = 0; i < MaxCount; i++)
            {
                e.IncrementCount();
                Console.WriteLine(e.GetCountString());
                Thread.Sleep(delay);
            }
            CountChuckle.AhAhAh();
            Console.WriteLine(" ");
        }
Beispiel #8
0
 public static void Count(ICountable c, int maxCount)
 {
     //use while to count the number of Countable objects
     while (maxCount != 0)
     {
         c.IncrementCount();
         Console.WriteLine(c.GetCountString());
         maxCount--;
     }
     Console.WriteLine();
     //reset the count
     c.ResetCount();
 }