X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FSimulation.hpp;h=2f2239efe1d9c77b03b1bd10e7151a7c0c659a0c;hb=25ea209f2732dfe643844f303d304dc3c6a5f4f0;hp=6d22ed3ef9e5087f886e2f1c62e94ef34af57aea;hpb=0453d6da05d4b29d953f00857d743310d9344ce0;p=blobs.git diff --git a/src/world/Simulation.hpp b/src/world/Simulation.hpp index 6d22ed3..2f2239e 100644 --- a/src/world/Simulation.hpp +++ b/src/world/Simulation.hpp @@ -1,16 +1,24 @@ #ifndef BLOBS_WORLD_SIMULATION_HPP_ #define BLOBS_WORLD_SIMULATION_HPP_ +#include "Set.hpp" + +#include + namespace blobs { namespace world { class Body; +class Planet; +class Resource; +class Sun; +class TileType; class Simulation { public: - explicit Simulation(Body &root); + explicit Simulation(Body &root, const Set &, const Set &); ~Simulation(); Simulation(const Simulation &) = delete; @@ -22,13 +30,29 @@ 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 Set &Resources() const noexcept { return resources; } + const Set &TileTypes() const noexcept { return tile_types; } + + const std::set &Bodies() const noexcept { return bodies; } + const std::set &Planets() const noexcept { return planets; } + const std::set &Suns() const noexcept { return suns; } double Time() const noexcept { return time; } private: Body &root; + const Set &resources; + const Set &tile_types; + std::set bodies; + std::set planets; + std::set suns; double time; };