public override string Part1(List <string> input, bool isTestRun) { List <Nanobot> bots = new List <Nanobot>(); foreach (string line in input) { bots.Add(new Nanobot(line, ref bots)); } Nanobot botWithLargestRange = bots.OrderByDescending(b => b.Radius).First(); return(botWithLargestRange.BotsInRange.Count().ToString()); }
private int Distance(Nanobot otherBot) { return(Distance(otherBot.X, otherBot.Y, otherBot.Z)); }