]> ruin.nu Git - popboot.git/blobdiff - planner.cpp
initial execution of the plan
[popboot.git] / planner.cpp
index b675ce061f6f8b29a3e0ee0352548616ab22e715..463049473fe16ce62ac9207bce287f270867da0b 100644 (file)
@@ -6,9 +6,9 @@ using namespace __gnu_cxx;
 
 Planner::Planner(std::vector<Action> 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<Action>::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();
+}