Exemplo n.º 1
0
        /// <summary>
        /// Returns a WorldGoal that contains all the preconditions that the target
        /// of the action must satisfy.
        /// </summary>
        public virtual WorldGoal GetDependentPreconditions(IStateful agent, IStateful target)
        {
            var worldPreconditions = WorldGoal.Borrow();

            if (targetPreconditions.Count > 0)
            {
                worldPreconditions[target] = targetPreconditions;
            }
            return(worldPreconditions);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns a WorldGoal that contains all the preconditions that the agent
        /// must satisfy.
        /// </summary>
        public virtual WorldGoal GetIndependentPreconditions(IStateful agent)
        {
            var worldPreconditions = WorldGoal.Borrow();

            if (preconditions.Count > 0)
            {
                worldPreconditions[agent] = preconditions;
            }
            return(worldPreconditions);
        }