]> ruin.nu Git - popboot.git/blobdiff - planner.cpp
it compiles
[popboot.git] / planner.cpp
index 159cb528d68f15e5e0d5667facef30455042867d..c5016a18b4e43b8aa65147e204ed58c6f27e6663 100644 (file)
@@ -1,3 +1,20 @@
 #include "planner.h"
+#include "node.h"
+using namespace std;
 
+Planner::Planner(std::vector<Action> actions, literals init, literals goal){
 
+       _start = new Node(Action("",init, literals()));
+       Node* finish = new Node(Action("",literals(),goal));
+
+       for(vector<Action>::iterator action = actions.begin(); action != actions.end(); ++action){
+               literals preconds = action->preconditions();
+               for (literals::iterator effect = preconds.begin(); effect != preconds.end(); ++effect){
+                       _actions[*effect] = *action;
+               }
+       }
+}
+
+
+void Planner::makePlan(Node* node){
+}