コード例 #1
0
        private static void dropBallsToSystem(int depth, int ballCount, ISystemService systemService, IBallService ballService)
        {
            var system = systemService.CreateSystem(depth);

            for (var i = 0; i < ballCount; i++)
            {
                var ball = ballService.CreateBall(i);
                systemService.AddBallToSystem(ball, system);
            }

            var emptyContainers = systemService.GetEmptyContainers(system);

            Console.WriteLine("Empty Container Names:" + string.Join(",", emptyContainers.Select(p => p.Name).ToArray()));
        }