public static void ExecuteStarTwo(string fileLocation = "PuzzleInput/Day3.txt") { string[] lines = File.ReadAllLines(fileLocation); WirePanel wp = new WirePanel(lines[0], lines[1]); Logger.LogMessage(LogLevel.ANSWER, "3A: Fewest Steps to Intersection: " + wp.GetFewestStepsIntersection()); }
public override void ParseInput(string input) { var wires = input.Split('\n'); Wire wire1 = new Wire(wires[0]); Wire wire2 = new Wire(wires[1]); panel = new WirePanel(wire1, wire2); }
public static void ExecuteStarOne(string fileLocation = "PuzzleInput/Day3.txt") { string[] lines = File.ReadAllLines(fileLocation); WirePanel wp = new WirePanel(lines[0], lines[1]); Logger.LogMessage(LogLevel.ANSWER, "3A: Closest Intersection: " + wp.GetClosestIntersectionDistance()); }
public void SolveDayThree() { string resultsFile = "adventDayThreeSolution.txt"; string dataFile = "adventDayThree.txt"; string outFile = Path.Combine(baseDir, resultsFile); string inFile = Path.Combine(baseDir, dataFile); WirePanel wp = new WirePanel(); wp.PlaceWiresFromFile(inFile, outFile); }