public Node(Node parent, float runningCost, HashSet <KeyValuePair <GOAP.ActionKey, object> > state, GOAP.Action action) { this.parent = parent; this.runningCost = runningCost; this.state = state; this.action = action; }
public Node(Node parent, float cost, Dictionary <string, int> allStates, GOAP.Action action) { this.parent = parent; this.cost = cost; this.state = new Dictionary <string, int>(allStates); this.action = action; }
private HashSet <GOAP.Action> ActionSubset(HashSet <GOAP.Action> actions, GOAP.Action toRemove) { HashSet <GOAP.Action> subset = new HashSet <GOAP.Action>(); foreach (GOAP.Action action in actions) { if (!action.Equals(toRemove)) { _ = subset.Add(action); } } return(subset); }