예제 #1
0
        public void TestCollisionProduct()
        {
            Toboggan toboggan = new Toboggan("input/day3.txt");

            Assert.Equal(336, toboggan.CollisionProduct(new int[, ] {
                { 1, 1 }, { 3, 1 }, { 5, 1 }, { 7, 1 }, { 1, 2 }
            }));
        }
예제 #2
0
        public override Day Run()
        {
            dayOfMonth = 3;
            stopwatch.Start();
            Toboggan toboggan = new Toboggan("input/day3.txt");

            answer_part1 = toboggan.Collisions(3, 1).ToString();
            answer_part2 = toboggan.CollisionProduct(new int[, ] {
                { 1, 1 }, { 3, 1 }, { 5, 1 }, { 7, 1 }, { 1, 2 }
            }).ToString();
            return(this);
        }
예제 #3
0
        public void TestCollisions()
        {
            Toboggan toboggan = new Toboggan("input/day3.txt");

            Assert.Equal(7, toboggan.Collisions(3, 1));
        }