Пример #1
0
        public void Day03_PartTwoTest()
        {
            var combos = new List <(int, int)> {
                (1, 1), (1, 3), (1, 5), (1, 7), (2, 1)
            };

            Assert.AreEqual(3521829480, SlopeTreeCounter.DescendAndCountTreesMultipleSlopes(_items, combos));
        }
Пример #2
0
        public void Day03_PartOneTest()
        {
            var lines = @"..##.........##.........##.........##.........##.........##.......
#...#...#..#...#...#..#...#...#..#...#...#..#...#...#..#...#...#..
.#....#..#..#....#..#..#....#..#..#....#..#..#....#..#..#....#..#.
..#.#...#.#..#.#...#.#..#.#...#.#..#.#...#.#..#.#...#.#..#.#...#.#
.#...##..#..#...##..#..#...##..#..#...##..#..#...##..#..#...##..#.
..#.##.......#.##.......#.##.......#.##.......#.##.......#.##.....
.#.#.#....#.#.#.#....#.#.#.#....#.#.#.#....#.#.#.#....#.#.#.#....#
.#........#.#........#.#........#.#........#.#........#.#........#
#.##...#...#.##...#...#.##...#...#.##...#...#.##...#...#.##...#...
#...##....##...##....##...##....##...##....##...##....##...##....#
.#..#...#.#.#..#...#.#.#..#...#.#.#..#...#.#.#..#...#.#.#..#...#.#".Split(Environment.NewLine);

            Assert.AreEqual(7, SlopeTreeCounter.DescendAndCountTrees(lines, 1, 3));
        }
Пример #3
0
 public void Day03_PartOneTest()
 {
     Assert.AreEqual(156, SlopeTreeCounter.DescendAndCountTrees(_items, 1, 3));
 }