]> git.localhorst.tv Git - blobs.git/blobdiff - src/creature/Creature.hpp
track where a creature has been
[blobs.git] / src / creature / Creature.hpp
index 6c918270e540594bc18d0e19bd0240f80af50c80..7c06cc81d876a1c1464552c4c38e1807db4bf221 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "Genome.hpp"
 #include "Goal.hpp"
+#include "Memory.hpp"
 #include "Need.hpp"
 #include "Situation.hpp"
 #include "Steering.hpp"
@@ -76,6 +77,9 @@ public:
        void Remove() noexcept { removable = true; }
        bool Removable() const noexcept { return removable; }
 
+       Memory &GetMemory() noexcept { return memory; }
+       const Memory &GetMemory() const noexcept { return memory; }
+
        void AddNeed(std::unique_ptr<Need> &&n) { needs.emplace_back(std::move(n)); }
        const std::vector<std::unique_ptr<Need>> &Needs() const noexcept { return needs; }
 
@@ -115,6 +119,8 @@ private:
        Callback on_death;
        bool removable;
 
+       Memory memory;
+
        std::vector<std::unique_ptr<Need>> needs;
        std::vector<std::unique_ptr<Goal>> goals;