private static BunnyFactory SolveFactory(string input) { var instructions = Instruction.Factory.CreateInstructions(input); var factory = new BunnyFactory(); while (instructions.Any(_ => !_.Done)) { foreach (var instruction in instructions.Where(_ => !_.Done)) { factory.Accept(instruction); } } return(factory); }
public abstract void Visit(BunnyFactory factory);