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(); }
static void Main(string[] args) { Console.WriteLine("Count Alligators..."); CountTestApp.RunTest(new Alligator(), 3); Console.WriteLine("\nCount Sheep..."); CountTestApp.RunCloneTest(); while (true) { string newName = Validator.promptUser("\nWhat would you like to name your clone? ", (str => !String.IsNullOrWhiteSpace(str))); int maxCount = int.Parse(Validator.promptUser("How many clones would you like? ", (num => int.TryParse(num, out maxCount) && maxCount > 0))); CountTestApp.RunTest((ICountable)(new Sheep()).Clone(), maxCount, newName); if (!Validator.promptYN("\nWould you like to clone another? (y/n) ")) { break; } } }