1 #ifndef GAMES_SPIDERS_SPIDERLING_H
2 #define GAMES_SPIDERS_SPIDERLING_H
14 #include <unordered_map>
16 #include <initializer_list>
18 #include "../../joueur/src/any.hpp"
22 #include "impl/spiders_fwd.hpp"
94 Spiderling_(std::initializer_list<std::pair<std::string, Any&&>> init);
95 Spiderling_() : Spiderling_({}){}
96 virtual void resize(
const std::string& name, std::size_t size)
override;
97 virtual void change_vec_values(
const std::string& name, std::vector<std::pair<std::size_t, Any>>& values)
override;
98 virtual void remove_key(
const std::string& name, Any& key)
override;
99 virtual std::unique_ptr<Any> add_key_value(
const std::string& name, Any& key, Any& value)
override;
100 virtual bool is_map(
const std::string& name)
override;
101 virtual void rebind_by_name(Any* to_change,
const std::string& member, std::shared_ptr<Base_object> ref)
override;
112 #endif // GAMES_SPIDERS_SPIDERLING_H
const std::string & busy
When empty string this Spiderling is not busy, and can act. Otherwise a string representing what it i...
Definition: spiderling.hpp:44
const int & number_of_coworkers
The number of Spiderlings busy with the same work this Spiderling is doing, speeding up the task...
Definition: spiderling.hpp:59
const Web & moving_on_web
The Web this Spiderling is using to move. Null if it is not moving.
Definition: spiderling.hpp:49
A connection (edge) to a Nest (node) in the game that Spiders can converge on (regardless of owner)...
Definition: web.hpp:37
bool move(const Web &web)
starts moving the _spiderling across a _web to another _nest.
A Spider in the game. The most basic unit.
Definition: spider.hpp:37
const Nest & moving_to_nest
The Nest this Spiderling is moving to. Null if it is not moving.
Definition: spiderling.hpp:54
bool attack(const Spiderling &spiderling)
attacks another _spiderling.
const double & work_remaining
How much work needs to be done for this Spiderling to finish being busy. See docs for the Work formul...
Definition: spiderling.hpp:64
A location (node) connected to other Nests via Webs (edges) in the game that Spiders can converge on...
Definition: nest.hpp:37
A Spider spawned by the BroodMother.
Definition: spiderling.hpp:37