public string GetAnswerB(bool animate = false) { var botFactory = new BotFactory(210, 200); botFactory.AddInstructions(File.ReadAllLines("Day10_input.txt").OrderBy(l => l)); return("" + botFactory.OutputBins.Take(3) .Select(o => o.Value).Aggregate(1, (x, y) => x * y)); }
public string GetAnswerA(bool animate = false) { var botFactory = new BotFactory(210, 200); botFactory.AddInstructions(File.ReadAllLines("Day10_input.txt").OrderBy(l => l)); return("" + botFactory.Bots .First(b => b.ComparedValues.Contains(new Tuple <int, int>(17, 61))).BotId); }