public override StatusTypes Process() { ActivateIfInactive(); var subgoalStatus = ProcessSubgoals(); if (subgoalStatus != StatusTypes.Completed && subgoalStatus != StatusTypes.Failed) { return(Status); } Status = StatusTypes.Inactive; _bestDesirability = 0.0f; if (!Subgoals.IsEmpty()) { Subgoals.Peek().Terminate(); } return(Status); }
public bool NotPresent(GoalTypes goalType) { return(Subgoals.Count <= 0 || Subgoals.Peek().GoalType != goalType); }