1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- //
- // Created by jovian on 17/08/17.
- //
- #ifndef SPACEEXPANSION_UNIVERSE_H
- #define SPACEEXPANSION_UNIVERSE_H
- #include <set>
- #include <vector>
- #include "Planet.h"
- #include "StarShip.h"
- #include "../Rules/PlanetStep.h"
- class Universe {
- // Methods
- public:
- Universe();
- ~Universe();
- void collectVisuals(std::vector<Visual *> &scope);
- void update(); // Call update for each ship and each planet
- void routeShips(); // Move ships between space and planets
- void createRandomUniverse();
- void addRule(PlanetStep *rule);
- const PlanetDef getNearestPlanetInfo(b2Vec2 from);
- // Attributes
- private:
- std::vector<Planet *> m_planets;
- std::vector<StarShip *> m_ships;
- std::set<StarShip *> m_travellingShips;
- std::vector<PlanetStep *> m_rules;
- };
- #endif //SPACEEXPANSION_UNIVERSE_H
|