// // Created by jovian on 17/08/17. // #ifndef SPACEEXPANSION_PLANET_H #define SPACEEXPANSION_PLANET_H #include #include "../Graphics/Visual.h" #include "../Rules/PlanetStep.h" #include "StarShip.h" class Planet { // Methods public: Planet(const PlanetDef &def); virtual ~Planet(); Visual *makeVisual(); void applyRule(PlanetStep *rule); const PlanetDef &getDef() const; int getId() const; void landShip(StarShip *ship); // If a ship is arrived it can land on the planet bool readyShip(); // Return true if at least one ship is ready to go StarShip* launchShip(const Stock &avg); // Load and launch a ship into space bool need(Resource res, Stock average); // Return true if this lanet need res static std::string randomName(); // Attributes private: PlanetDef m_def; int m_idPlanet; unsigned int m_imgId; float m_angle; std::vector m_landedShips; // Static private: static int m_incr; // Useful for indexing }; #endif //SPACEEXPANSION_PLANET_H