]> git.localhorst.tv Git - blobs.git/blobdiff - src/world/Simulation.hpp
extract situation from creature
[blobs.git] / src / world / Simulation.hpp
index 2acf54981b29b9bc04177a44a9b5cd84256503ca..ea81de5ba226fcc812491aa18bbc44e8c704e361 100644 (file)
@@ -1,11 +1,15 @@
 #ifndef BLOBS_WORLD_SIMULATION_HPP_
 #define BLOBS_WORLD_SIMULATION_HPP_
 
+#include <set>
+
 
 namespace blobs {
 namespace world {
 
 class Body;
+class Planet;
+class Sun;
 
 class Simulation {
 
@@ -22,11 +26,25 @@ public:
 public:
        void Tick();
 
-       Body &Root() { return root; }
-       const Body &Root() const { return root; }
+       void AddBody(Body &);
+       void AddPlanet(Planet &);
+       void AddSun(Sun &);
+
+       Body &Root() noexcept { return root; }
+       const Body &Root() const noexcept { return root; }
+
+       const std::set<Body *> &Bodies() const noexcept { return bodies; }
+       const std::set<Planet *> &Planets() const noexcept { return planets; }
+       const std::set<Sun *> &Suns() const noexcept { return suns; }
+
+       double Time() const noexcept { return time; }
 
 private:
        Body &root;
+       std::set<Body *> bodies;
+       std::set<Planet *> planets;
+       std::set<Sun *> suns;
+       double time;
 
 };