]> ruin.nu Git - popboot.git/blob - node.h
only execute an action when all preconditions are are true
[popboot.git] / node.h
1 #ifndef __node_h__
2 #define __node_h__
3
4 #include <vector>
5 #include "action.h"
6
7 class Node {
8
9         public:
10                 Node(Action action);
11                 void addChild(Node* node);
12                 Action action();
13                 void execute(literals effects);
14
15         protected:
16                 Action _action;
17                 std::vector<Node*> _children;
18                 literals _preconditions;
19 };
20
21 #endif