Esempio n. 1
0
        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());
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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());
        }
Esempio n. 4
0
        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);
        }