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::map<unsigned int, WorldObject>& GetObjectMap()
const;
38 std::shared_ptr<Domain> GetDomain()
const;
40 WorldObject& AddObject(
const std::string& typeName);
45 void AddQueuedObjects();
46 void RemoveQueuedObjects();
49 std::vector<const WorldObject*>
GetObjectsOfType(
const std::string& typeName)
const;
58 std::shared_ptr<Domain> domain =
nullptr;
59 std::map<unsigned int, WorldObject> objects{};
60 std::vector<WorldObject> objectsToAdd{};
64 std::vector<unsigned int> indicesToRemove{};
66 unsigned int nextIndex = 1;
71 #endif //GRAIL_WORLD_STATE_H