16 virtual void clear(
bool deleteActions);
17 uint size()
const {
return mActions.size(); }
18 const std::vector<Action *>& actions()
const {
return mActions; }
19 Action *getAction(Action::Index a)
const {
return mActions.at(a); }
20 Action *getAction(
const std::string &name)
const;
21 Action *getAction(PyObject *)
const;
23 void setOwnsActions(
bool own) { mOwnsActions = own; }
24 bool ownsActions()
const {
return mOwnsActions; }
25 const std::set<Action::Index>& getIllegal()
const {
return mIllegal; }
26 void setLegal(
Action *,
bool);
27 PyObject *getPy()
const;
29 std::vector<Action *> mActions;
31 std::set<Action::Index> mIllegal;
32 std::map<std::string, Action *> mActionMap;
33 bool mOwnsActions{
false};
46 void init(
ActionSpace&, Action::Index first, Action::Index last);
47 void init(
ActionSpace&,
const std::set<Action::Index> * = 0);
48 const std::vector<Action::Index> actions()
const {
return mActions; }
49 uint size()
const {
return mActions.size(); }
50 void clear() { mActions.clear(); }
51 void insert(Action::Index);
52 void remove(Action::Index);
56 std::vector<Action::Index> mActions;