#ifndef SIMULATION_H_7BF6EEA4 #define SIMULATION_H_7BF6EEA4 #include "entity.h" #include "renderer.h" #include #include #include class Level; class Simulation { public: using id_type = std::vector::size_type; // Constructor explicit Simulation(const Level& level) : level_(level) {} void tick( double dt, const Uint8* keystate); id_type emplaceEntity(); void deleteEntity(id_type id); Entity& getEntity(id_type id) { return entities_.at(id); } const Entity& getEntity(id_type id) const { return entities_.at(id); } const std::set& getActive() const { return active_; } const Level& getLevel() const { return level_; } private: const Level& level_; std::vector entities_; std::deque available_; std::set active_; }; #endif /* end of include guard: SIMULATION_H_7BF6EEA4 */