Beispiel #1
0
        public void PartTwoTest()
        {
            var map = Problem3.ParseInputToMap(Input);

            var total = Problem3.CountHits(map, 1, 1);

            total *= Problem3.CountHits(map, 3, 1);
            total *= Problem3.CountHits(map, 5, 1);
            total *= Problem3.CountHits(map, 7, 1);
            total *= Problem3.CountHits(map, 1, 2);

            Assert.AreEqual(336, total);
        }
Beispiel #2
0
 public void TestSlope(int xSpeed, int ySpeed, int expectedTrees)
 {
     Assert.AreEqual(expectedTrees, Problem3.CountHits(Problem3.ParseInputToMap(Input), xSpeed, ySpeed));
 }