SHARE
TWEET

ActionStep

Archon May 31st, 2012 25 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. };
RAW Paste Data
Want to get better at C++?
Learn to code C++ in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top