예제 #1
0
 static void Main(string[] args)
 {
     Console.Write($"Velcome to the Count's Castle! ");
     CountChuckle.AhAhAh();
     Console.WriteLine("\nLet us count some Alligators and Sheep on this fine Halloween day.\n");
     Thread.Sleep(1000);
     Console.Write("Counting Alligators ");
     Thread.Sleep(500);
     Console.Write(". ");
     Thread.Sleep(500);
     Console.Write(". ");
     Thread.Sleep(500);
     Console.Write(".\n");
     CountTestApp.RunAlligator();
     Thread.Sleep(500);
     Console.Write("Counting Sheep ");
     Thread.Sleep(500);
     Console.Write(". ");
     Thread.Sleep(500);
     Console.Write(". ");
     Thread.Sleep(500);
     Console.Write(".\n");
     CountTestApp.RunSheep();
     Console.WriteLine("\nThat is all, fang you very much for coming!");
     Console.ReadLine();
 }
예제 #2
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(" ");
        }