Ejemplo n.º 1
0
    public override Direccion GetDireccion()
    {
        Goal goal = new Goal();

        foreach (Targeter targeter in targeters)
        {
            goal.UpdateChannels(targeter.GetGoal());
        }
        foreach (Decomposer decomposer in decomposers)
        {
            goal = decomposer.Decompose(goal);
        }
        for (int i = 0;
             i < constraintSteps; i++)
        {
            Camino path = actuator.GetPath(goal);
            foreach (Constraint constraint in constraints)
            {
                if (constraint.WillViolate(path))
                {
                    goal = constraint.Suggest(path); break;
                }
                return(actuator.GetOutput(path, goal));
            }
        }
        return(base.GetDireccion());
    }