public ChocolateBox GenerateChocolateBox(int noOfChocolates = 20) { ChocolateBox box = new ChocolateBox(); for (int i = 0; i < noOfChocolates; i++) { box.AddChocolate(_chocolateGenerator.GenerateChocolate()); } return(box); }
private static void RunSpecificScenario() { ForrestGumpGenerator fgGenerator = new ForrestGumpGenerator(); ChocolateBoxGenerator cbGenerator = new ChocolateBoxGenerator(); ForrestGump gump = fgGenerator.GenerateForrestGump(); ChocolateBox box = cbGenerator.GenerateChocolateBox(); gump.SayFavoriteProverb(); while (box.ChocolateLeft) { gump.Eat(box.TakeAChocolate()); } Console.WriteLine(); Console.WriteLine(); }