Пример #1
0
        public static void Problem15()
        {
            var discs = DiscFactory.CreatePart2();

            var optimizer = new TimeOptimizer(discs.ToArray());

            var time = optimizer.FindOptimalTime();

            Console.WriteLine("Optimal Time = {0}", time);
        }
Пример #2
0
        public void FindOptimalTime_ReturnsEarliestTime_ToDropCapsule()
        {
            var disc1 = new Disc(5, 4);
            var disc2 = new Disc(2, 1);

            var sut = new TimeOptimizer(new[] { disc1, disc2 });

            var actual = sut.FindOptimalTime();

            Assert.Equal(5, actual);
        }