public void ReleaseHavoc() { for (int b = 1; b <= numberOffBadBoys; b++) { foreach (ChristmasDecoration christmasDecoration in christmasDecorations) { if (christmasDecoration is IBreakable) { IBreakable breakable = (IBreakable)christmasDecoration; breakable.TryToBreak(); } if (christmasDecoration is IEatable) { IEatable eatable = (IEatable)christmasDecoration; eatable.TryToEat(); } } } for (int c = 1; c <= numberOffCats; c++) { foreach (ChristmasDecoration christmasDecoration in christmasDecorations) { if (christmasDecoration is ChristmasBauble) { ChristmasBauble christmasBauble = (ChristmasBauble)christmasDecoration; christmasBauble.TryToBreak(); } if (christmasDecoration is ChristmasCookie) { ChristmasCookie christmasCookie = (ChristmasCookie)christmasDecoration; christmasCookie.TryToEat(); } } } }