Пример #1
0
        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);
        }
Пример #2
0
 public abstract void Visit(BunnyFactory factory);