1 #ifndef GAMES_STARDASH_BODY_H
2 #define GAMES_STARDASH_BODY_H
14 #include <unordered_map>
16 #include <initializer_list>
18 #include "../../joueur/src/any.hpp"
20 #include "game_object.hpp"
22 #include "impl/stardash_fwd.hpp"
99 bool spawn(
const double&
x,
const double&
y,
const std::string& title);
112 Body_(std::initializer_list<std::pair<std::string, Any&&>> init);
113 Body_() : Body_({}){}
114 virtual void resize(
const std::string& name, std::size_t size)
override;
115 virtual void change_vec_values(
const std::string& name, std::vector<std::pair<std::size_t, Any>>& values)
override;
116 virtual void remove_key(
const std::string& name, Any& key)
override;
117 virtual std::unique_ptr<Any> add_key_value(
const std::string& name, Any& key, Any& value)
override;
118 virtual bool is_map(
const std::string& name)
override;
119 virtual void rebind_by_name(Any* to_change,
const std::string& member, std::shared_ptr<Base_object> ref)
override;
130 #endif // GAMES_STARDASH_BODY_H
const double & x
The x value this celestial body is on.
Definition: body.hpp:69
const double & y
The y value this celestial body is on.
Definition: body.hpp:74
const double & radius
The radius of the circle that this body takes up.
Definition: body.hpp:64
A player in this game. Every AI controls one player.
Definition: player.hpp:37
int next_y(int num)
the x value of this body a number of turns from now. (0-how many you want).
const int & amount
The amount of material the object has, or energy if it is a planet.
Definition: body.hpp:44
int next_x(int num)
the x value of this body a number of turns from now. (0-how many you want).
const Player & owner
The Player that owns and can control this Body.
Definition: body.hpp:59
const std::string & material_type
The type of material the celestial body has. Either 'none', 'genarium', 'rarium', 'legendarium'...
Definition: body.hpp:54
An object in the game. The most basic class that all game classes should inherit from automatically...
Definition: game_object.hpp:37
const std::string & body_type
The type of celestial body it is. Either 'planet', 'asteroid', or 'sun'.
Definition: body.hpp:49
A celestial body located within the game.
Definition: body.hpp:37
bool spawn(const double &x, const double &y, const std::string &title)
spawn a unit on some value of this celestial body.