public void Calibrate() { var device = new FrequencyDevice(); Console.WriteLine("Loading new frequency..."); var frequencies = device.GetFrequencyChanges(); foreach (var freq in frequencies) { device.ChangeFrequency(freq); } Console.WriteLine($"Final frequency: {device.CurrentFrequency}"); }
static void Main(string[] args) { Console.WriteLine("--- Day 1 ---"); Console.WriteLine("Part one"); var device = new FrequencyDevice(); device.Calibrate(); Console.WriteLine("Part two"); device = new FrequencyDevice(); device.FindDuplicateFrequency(); Console.ReadLine(); }