X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FSimulation.hpp;h=2f2239efe1d9c77b03b1bd10e7151a7c0c659a0c;hb=25ea209f2732dfe643844f303d304dc3c6a5f4f0;hp=2acf54981b29b9bc04177a44a9b5cd84256503ca;hpb=be413456f57da06e918ae7bf4c4f35e5198ff7ce;p=blobs.git diff --git a/src/world/Simulation.hpp b/src/world/Simulation.hpp index 2acf549..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,11 +30,30 @@ 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; };