public int Solution(string input) { Dictionary <string, string> instructions = instructionsRepository.GetInstructions(input); SortedDictionary <string, ushort> wireSignals = this.wireSignals.CalculateWireSignals(instructions); wireSignals.TryGetValue("a", out ushort wireA); instructions["b"] = $"{wireA} -> b"; wireSignals = this.wireSignals.CalculateWireSignals(instructions); wireSignals.TryGetValue("a", out wireA); return(wireA); }
public Part2() { instructionsRepository = new InstructionsRepository(); wireSignals = new WireSignals(); }