1 #ifndef GAMES_SPIDERS_WEB_H
2 #define GAMES_SPIDERS_WEB_H
14 #include <unordered_map>
16 #include <initializer_list>
18 #include "../../joueur/src/any.hpp"
20 #include "game_object.hpp"
22 #include "impl/spiders_fwd.hpp"
87 Web_(std::initializer_list<std::pair<std::string, Any&&>> init);
89 virtual void resize(
const std::string& name, std::size_t size)
override;
90 virtual void change_vec_values(
const std::string& name, std::vector<std::pair<std::size_t, Any>>& values)
override;
91 virtual void remove_key(
const std::string& name, Any& key)
override;
92 virtual std::unique_ptr<Any> add_key_value(
const std::string& name, Any& key, Any& value)
override;
93 virtual bool is_map(
const std::string& name)
override;
94 virtual void rebind_by_name(Any* to_change,
const std::string& member, std::shared_ptr<Base_object> ref)
override;
105 #endif // GAMES_SPIDERS_WEB_H
const int & strength
How much weight this Web can take before snapping and destroying itself and all the Spiders on it...
Definition: web.hpp:69
const Nest & nest_b
The second Nest this Web is connected to.
Definition: web.hpp:59
A connection (edge) to a Nest (node) in the game that Spiders can converge on (regardless of owner)...
Definition: web.hpp:37
const std::vector< Spiderling > & spiderlings
All the Spiderlings currently moving along this Web.
Definition: web.hpp:64
const Nest & nest_a
The first Nest this Web is connected to.
Definition: web.hpp:54
const double & length
How long this Web is, i.e., the distance between its nestA and nestB.
Definition: web.hpp:44
const int & load
How much weight this Web currently has on it, which is the sum of all its Spiderlings weight...
Definition: web.hpp:49
A location (node) connected to other Nests via Webs (edges) in the game that Spiders can converge on...
Definition: nest.hpp:37
An object in the game. The most basic class that all game classes should inherit from automatically...
Definition: game_object.hpp:37