]> git.localhorst.tv Git - blobs.git/blobdiff - src/world/Simulation.hpp
load universe from file
[blobs.git] / src / world / Simulation.hpp
index 3be86a7b130fd9c42166eb746f5c387fd5432e27..3357e520ec86d0ee0619ab4e78e56c386ae8a15c 100644 (file)
@@ -25,7 +25,7 @@ class TileType;
 class Simulation {
 
 public:
-       explicit Simulation(Body &root, app::Assets &);
+       explicit Simulation(app::Assets &);
        ~Simulation();
 
        Simulation(const Simulation &) = delete;
@@ -37,9 +37,6 @@ public:
 public:
        void Tick(double dt);
 
-       Body &Root() noexcept { return root; }
-       const Body &Root() const noexcept { return root; }
-
        app::Assets &Assets() noexcept { return assets; }
        const app::Assets &Assets() const noexcept { return assets; }
        const Set<Resource> &Resources() const noexcept { return assets.data.resources; }
@@ -52,6 +49,7 @@ public:
        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; }
+       Planet &PlanetByName(const std::string &);
 
        void SetAlive(creature::Creature *);
        std::vector<creature::Creature *> &LiveCreatures() noexcept { return alive; }
@@ -70,7 +68,6 @@ public:
        std::ostream &Log();
 
 private:
-       Body &root;
        app::Assets &assets;
 
        std::set<Body *> bodies;