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 } })); }
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); }
public void TestCollisions() { Toboggan toboggan = new Toboggan("input/day3.txt"); Assert.Equal(7, toboggan.Collisions(3, 1)); }