+bool Node::executed() const{
+ return _executed;
+}
+
+const Literals& Node::effects() const{
+ return _effects;
+}
+
+void Node::execute(bool strict, const Literals& effects){
+ for (Literals::const_iterator effect = effects.begin(); effect != effects.end(); ++effect){
+ _preconditions.erase(_preconditions.find(*effect));
+ }
+ if ((_preconditions.size() != 0 && strict) || _executed)
+ return;
+
+ if (_preconditions.size() != 0){
+ for (Preconditions::iterator precond = _preconditions.begin(); precond != _preconditions.end(); ++precond){
+ if (precond->second)
+ return;
+ }
+ }
+
+ _executed = true;
+ int value = _action.execute();
+ _effects = _action.effects(value);