A Spiderling that can cut existing Webs.
More...
#include <cutter.hpp>
|
bool | cut (const Web &web) |
| cuts a web, destroying it, and any _spiderlings on it. More...
|
|
bool | attack (const Spiderling &spiderling) |
| attacks another _spiderling. More...
|
|
bool | move (const Web &web) |
| starts moving the _spiderling across a _web to another _nest. More...
|
|
void | log (const std::string &message) |
| adds a message to this _game_object's logs. _intended for your own debugging purposes, as strings stored here are saved in the gamelog. More...
|
|
template<typename T > |
std::shared_ptr< typename
T::element_type > | as () |
| Dynamically casts this object to another type. Returns nullptr if it cannot be converted to the type. More...
|
|
template<typename T > |
bool | is () |
| Determines if this object is of the specified object type More...
|
|
A Spiderling that can cut existing Webs.
template<typename T >
std::shared_ptr<typename T::element_type> cpp_client::Base_object::as |
( |
| ) |
|
|
inlineinherited |
Dynamically casts this object to another type. Returns nullptr if it cannot be converted to the type.
- Returns
- A pointer to the desired type, or nullptr if it could not be converted
bool cpp_client::spiders::Spiderling::attack |
( |
const Spiderling & |
spiderling | ) |
|
|
inherited |
attacks another _spiderling.
- Parameters
-
bool cpp_client::spiders::Cutter::cut |
( |
const Web & |
web | ) |
|
cuts a web, destroying it, and any _spiderlings on it.
- Parameters
-
web | The web you want to Cut. Must be connected to the Nest this Cutter is currently on. |
template<typename T >
bool cpp_client::Base_object::is |
( |
| ) |
|
|
inlineinherited |
Determines if this object is of the specified object type
- Returns
- true if the object is the object type, false otherwise
void cpp_client::spiders::Game_object::log |
( |
const std::string & |
message | ) |
|
|
inherited |
adds a message to this _game_object's logs. _intended for your own debugging purposes, as strings stored here are saved in the gamelog.
- Parameters
-
message | A string to add to this GameObject's log. Intended for debugging. |
bool cpp_client::spiders::Spiderling::move |
( |
const Web & |
web | ) |
|
|
inherited |
starts moving the _spiderling across a _web to another _nest.
- Parameters
-
web | The Web you want to move across to the other Nest. |
const std::string& cpp_client::spiders::Spiderling::busy |
|
inherited |
When empty string this Spiderling is not busy, and can act. Otherwise a string representing what it is busy with, e.g. 'Moving', 'Attacking'.
const Web& cpp_client::spiders::Cutter::cutting_web |
The Web that this Cutter is trying to cut. Null if not cutting.
const std::string& cpp_client::spiders::Game_object::game_object_name |
|
inherited |
String representing the top level Class that this game object is an instance of. Used for reflection to create new instances on clients, but exposed for convenience should AIs want this data.
const std::string& cpp_client::spiders::Game_object::id |
|
inherited |
A unique id for each instance of a GameObject or a sub class. Used for client and server communication. Should never change value after being set.
const bool& cpp_client::spiders::Spider::is_dead |
|
inherited |
If this Spider is dead and has been removed from the game.
const std::vector<std::string>& cpp_client::spiders::Game_object::logs |
|
inherited |
Any strings logged will be stored here. Intended for debugging.
const Web& cpp_client::spiders::Spiderling::moving_on_web |
|
inherited |
The Web this Spiderling is using to move. Null if it is not moving.
const Nest& cpp_client::spiders::Spiderling::moving_to_nest |
|
inherited |
const Nest& cpp_client::spiders::Spider::nest |
|
inherited |
The Nest that this Spider is currently on. Null when moving on a Web.
const int& cpp_client::spiders::Spiderling::number_of_coworkers |
|
inherited |
The number of Spiderlings busy with the same work this Spiderling is doing, speeding up the task.
const Player& cpp_client::spiders::Spider::owner |
|
inherited |
const double& cpp_client::spiders::Spiderling::work_remaining |
|
inherited |
How much work needs to be done for this Spiderling to finish being busy. See docs for the Work formula.
The documentation for this class was generated from the following file: