public static void Part2(string[] input) { Helper.PrintChallengePart("Part 2"); long treeCount = 1; TobogganSatNav satSav = new TobogganSatNav(input); treeCount = treeCount * satSav.RoutePlanner(1, 1); treeCount = treeCount * satSav.RoutePlanner(3, 1); treeCount = treeCount * satSav.RoutePlanner(5, 1); treeCount = treeCount * satSav.RoutePlanner(7, 1); treeCount = treeCount * satSav.RoutePlanner(1, 2); Console.WriteLine("Trees Hit: " + treeCount); }
public void Day3Part2Test() { // Arrange string[] input = Helper.ParseInput(@"Inputs\\Day3_example.txt"); // Act int treeCount = 1; TobogganSatNav satSav = new TobogganSatNav(input); treeCount = treeCount * satSav.RoutePlanner(1, 1); treeCount = treeCount * satSav.RoutePlanner(3, 1); treeCount = treeCount * satSav.RoutePlanner(5, 1); treeCount = treeCount * satSav.RoutePlanner(7, 1); treeCount = treeCount * satSav.RoutePlanner(1, 2); // Assert Assert.AreEqual(336, treeCount); }
public static void Part1(string[] input) { Helper.PrintChallengePart("Part 1"); TobogganSatNav satSav = new TobogganSatNav(input); int treeCount = satSav.RoutePlanner(3, 1); Console.WriteLine("Trees Hit: " + treeCount); }
public void Day3Part1Test() { // Arrange string[] input = Helper.ParseInput(@"Inputs\\Day3_example.txt"); // Act TobogganSatNav satSav = new TobogganSatNav(input); int treeCount = satSav.RoutePlanner(3, 1); // Assert Assert.AreEqual(7, treeCount); }