X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=planner.cpp;h=a15028e29a3175e8fa316e2e6e6a37e2dc41194f;hb=09f6dfa65b66103c27dc831271d961de9ab0109e;hp=b675ce061f6f8b29a3e0ee0352548616ab22e715;hpb=f42886c46e17e6e429efa36aab69e0cbd22cf87a;p=popboot.git diff --git a/planner.cpp b/planner.cpp index b675ce0..a15028e 100644 --- a/planner.cpp +++ b/planner.cpp @@ -6,9 +6,9 @@ using namespace __gnu_cxx; Planner::Planner(std::vector actions, literals init, literals goal){ - _start = new Node(Action("",literals(), init)); + _start = new Node(Action("start",literals(), init)); addNode(_start); - Node* finish = new Node(Action("",goal,literals())); + Node* finish = new Node(Action("finish",goal,literals())); for(vector::iterator action = actions.begin(); action != actions.end(); ++action){ literals effects = action->effects(); @@ -58,3 +58,8 @@ void Planner::addNode(Node* node){ _addedNodes[*effect] = node; } } + + +void Planner::execute(){ + _start->execute(literals()); +}