Example #1
0
        // == == == == == Puzzle 2 == == == == ==
        public static string Puzzle2(string input)
        {
            var ts = new TobogganSlope(input);

            var treesHit = ts.TreesHitOnRide(1, 1);

            treesHit *= ts.TreesHitOnRide(3, 1);
            treesHit *= ts.TreesHitOnRide(5, 1);
            treesHit *= ts.TreesHitOnRide(7, 1);
            treesHit *= ts.TreesHitOnRide(1, 2);

            return(treesHit.ToString());
        }
Example #2
0
        // == == == == == Puzzle 1 == == == == ==
        public static string Puzzle1(string input)
        {
            var ts = new TobogganSlope(input);

            return(ts.TreesHitOnRide(3, 1).ToString());
        }