예제 #1
0
        static void Day3a()
        {
            string[] records = System.IO.File
                               .ReadAllLines(@"../../../data/Day3.txt")
                               .ToArray();
            var slope = new Libraries.Day_3.Slopes();

            Console.WriteLine("Day 3a: The number of trees on Slope are {0}", slope.CountTreesInSlope(records));
        }
예제 #2
0
        static void Day3b()
        {
            string[] records = System.IO.File
                               .ReadAllLines(@"../../../data/Day3.txt")
                               .ToArray();
            var slope = new Libraries.Day_3.Slopes();

            List <int[]> angles = new List <int[]>()
            {
                new int[] { 1, 1 },
                new int[] { 3, 1 },
                new int[] { 5, 1 },
                new int[] { 7, 1 },
                new int[] { 1, 2 }
            };

            Console.WriteLine("Day 3b: The number of multiplied trees on each Slope are {0}", slope.MultipySlopes(records, angles));
        }