Advertisement
Archon

ActionStep

May 31st, 2012
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. //one node in an action search tree.
  2. class ActionStep{
  3. public:
  4.    typedef std::vector<ActionStep *> children_t;
  5.  
  6. private:
  7.  
  8.    Action action_;
  9.  
  10.    timer_t totalTime_; //including this step, and all previous steps
  11.  
  12.    //updated state
  13.    std::map<Person *, Person> changedPersons_;
  14.    std::map<Object *, Object> changedObjects_;
  15.  
  16.    //children
  17.    children_t children_;
  18.  
  19.  
  20. public:
  21.  
  22.    ActionStep(const Action &action, timer_t totalTime = 0);
  23.  
  24.    //recursively add actions, until the goal requirements are met
  25.    void addActions(const Goal &goal);
  26. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement