Пример #1
0
        public override void Execute(RobotController target, InstructionExecutor executor)
        {
            instructionExecutor = executor;
            robot = target;
            var didMove = false;

            // Try to drop
            didMove = robot.DropItem(moveDirection);

            if (!didMove)
            {
                throw new InstructionException("Could not drop in given direction");
            }
        }