3 #ifndef GRAIL_WORLD_STATE_H
4 #define GRAIL_WORLD_STATE_H
8 #include "WorldObject.hh"
9 #include "../Domain.hh"
20 const std::vector<WorldObject>& worldObjects);
28 bool operator==(
const WorldState& other)
const;
30 std::vector<class Action> GetLegalActions()
const;
31 std::vector<std::vector<unsigned int>> GenerateParameterLists(
32 const std::vector<std::vector<unsigned int>>& precedingParameterLists,
33 unsigned int searchedTypeIndex)
const;
35 const WorldObject* GetObjectByIndex(
unsigned int index)
const;
37 const std::string* GetDeletedObjectType(
unsigned int index)
const;
38 const std::map<unsigned int, WorldObject>& GetObjectMap()
const;
39 std::shared_ptr<Domain> GetDomain()
const;
41 WorldObject& AddObject(
const std::string& typeName);
46 void AddQueuedObjects();
47 void RemoveQueuedObjects();
50 std::vector<const WorldObject*>
GetObjectsOfType(
const std::string& typeName)
const;
59 std::shared_ptr<Domain> domain =
nullptr;
60 std::map<unsigned int, WorldObject> objects{};
61 std::vector<WorldObject> objectsToAdd{};
65 std::vector<unsigned int> indicesToRemove{};
67 unsigned int nextIndex = 1;
72 #endif //GRAIL_WORLD_STATE_H