]> ruin.nu Git - popboot.git/commitdiff
some changes
authorMichael Andreen <harv@ruin.nu>
Fri, 6 May 2005 14:32:02 +0000 (14:32 +0000)
committerMichael Andreen <harv@ruin.nu>
Fri, 6 May 2005 14:32:02 +0000 (14:32 +0000)
node.cpp
node.h
planner.h

index b6347a4d78cb016bf71b60660dd61a27475678e8..a9cb4539431d6d1f959339f9e042d867ba68fb74 100644 (file)
--- a/node.cpp
+++ b/node.cpp
@@ -1 +1,6 @@
 #include "node.h"
 #include "node.h"
+
+Node::Node(Action action, std::vector<Node&> children){
+       _action = action;
+       _children = children;
+}
diff --git a/node.h b/node.h
index 27a95c49b6db4048f251845ac599eef381dc5a4d..db9fb09663fbcff9fa99d797269a84ff1286e630 100644 (file)
--- a/node.h
+++ b/node.h
@@ -2,12 +2,17 @@
 #define __node_h__
 
 #include <vector>
 #define __node_h__
 
 #include <vector>
+#include "action.h"
 
 class Node {
 
 
 class Node {
 
+       Node(Action action, std::vector<Node&> children);
+
+       addChild(Node& node);
+
        protected:
        protected:
-               Action action;
-               std::vector<Node*> children;
+               Action _action;
+               std::vector<Node&> _children;
 };
 
 #endif
 };
 
 #endif
index 4846fd9166a908b0a0d54b7b592455d24cfce0b5..1b4938b36e7eb04560342e9403baeec3499d896f 100644 (file)
--- a/planner.h
+++ b/planner.h
@@ -1,12 +1,14 @@
 #ifndef __PLANNER_H__
 #define __PLANNER_H__
 #ifndef __PLANNER_H__
 #define __PLANNER_H__
+
 #include <hash_map>
 #include <hash_map>
+#include "node.h"
 
 class Planner {
        public:
 
        protected:
                Node start;
 
 class Planner {
        public:
 
        protected:
                Node start;
-               std::hash_map addedNodes;
+               std::hash_map<string,Node*> addedNodes;
 };
 #endif
 };
 #endif