private bool TryRun(List <Operation> instructions, out int acc) { var inter = new LoopInterpreter(instructions); acc = inter.Run(); return(inter.ReachedEnd); }
public override void Solve() { var parser = new Parser(); var runner = new LoopInterpreter(parser, Input); int result = runner.Run(); Console.WriteLine($"Accumulator was at {result} before loop was found."); }