A typical abandoned warehouse that anarchists hang out in and can be bribed to burn down Buildings.
More...
#include <warehouse.hpp>
|
int | ignite (const Building &building) |
| bribes the _warehouse to light a _building on fire. _this adds this building's fire_added to their fire, and then this building's exposure is increased based on the _manhattan distance between the two buildings. 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...
|
|
|
const int & | exposure |
| How exposed the anarchists in this warehouse are to PoliceDepartments. Raises when bribed to ignite buildings, and drops each turn if not bribed. More...
|
|
const int & | fire_added |
| The amount of fire added to buildings when bribed to ignite a building. Headquarters add more fire than normal Warehouses. More...
|
|
const bool & | bribed |
| When true this building has already been bribed this turn and cannot be bribed again this turn. More...
|
|
const Building & | building_east |
| The Building directly to the east of this building, or null if not present. More...
|
|
const Building & | building_north |
| The Building directly to the north of this building, or null if not present. More...
|
|
const Building & | building_south |
| The Building directly to the south of this building, or null if not present. More...
|
|
const Building & | building_west |
| The Building directly to the west of this building, or null if not present. More...
|
|
const int & | fire |
| How much fire is currently burning the building, and thus how much damage it will take at the end of its owner's turn. 0 means no fire. More...
|
|
const int & | health |
| How much health this building currently has. When this reaches 0 the Building has been burned down. More...
|
|
const bool & | is_headquarters |
| True if this is the Headquarters of the owning player, false otherwise. Burning this down wins the game for the other Player. More...
|
|
const Player & | owner |
| The player that owns this building. If it burns down (health reaches 0) that player gets an additional bribe(s). More...
|
|
const int & | x |
| The location of the Building along the x-axis. More...
|
|
const int & | y |
| The location of the Building along the y-axis. More...
|
|
const std::string & | game_object_name |
| 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. More...
|
|
const std::string & | id |
| 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. More...
|
|
const std::vector< std::string > & | logs |
| Any strings logged will be stored here. Intended for debugging. More...
|
|
A typical abandoned warehouse that anarchists hang out in and can be bribed to burn down Buildings.
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
int cpp_client::anarchy::Warehouse::ignite |
( |
const Building & |
building | ) |
|
bribes the _warehouse to light a _building on fire. _this adds this building's fire_added to their fire, and then this building's exposure is increased based on the _manhattan distance between the two buildings.
- Parameters
-
building | The Building you want to light on fire. |
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::anarchy::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. |
const bool& cpp_client::anarchy::Building::bribed |
|
inherited |
When true this building has already been bribed this turn and cannot be bribed again this turn.
const Building& cpp_client::anarchy::Building::building_east |
|
inherited |
The Building directly to the east of this building, or null if not present.
const Building& cpp_client::anarchy::Building::building_north |
|
inherited |
The Building directly to the north of this building, or null if not present.
const Building& cpp_client::anarchy::Building::building_south |
|
inherited |
The Building directly to the south of this building, or null if not present.
const Building& cpp_client::anarchy::Building::building_west |
|
inherited |
The Building directly to the west of this building, or null if not present.
const int& cpp_client::anarchy::Warehouse::exposure |
How exposed the anarchists in this warehouse are to PoliceDepartments. Raises when bribed to ignite buildings, and drops each turn if not bribed.
const int& cpp_client::anarchy::Building::fire |
|
inherited |
How much fire is currently burning the building, and thus how much damage it will take at the end of its owner's turn. 0 means no fire.
const int& cpp_client::anarchy::Warehouse::fire_added |
The amount of fire added to buildings when bribed to ignite a building. Headquarters add more fire than normal Warehouses.
const std::string& cpp_client::anarchy::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 int& cpp_client::anarchy::Building::health |
|
inherited |
How much health this building currently has. When this reaches 0 the Building has been burned down.
const std::string& cpp_client::anarchy::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::anarchy::Building::is_headquarters |
|
inherited |
True if this is the Headquarters of the owning player, false otherwise. Burning this down wins the game for the other Player.
const std::vector<std::string>& cpp_client::anarchy::Game_object::logs |
|
inherited |
Any strings logged will be stored here. Intended for debugging.
const Player& cpp_client::anarchy::Building::owner |
|
inherited |
The player that owns this building. If it burns down (health reaches 0) that player gets an additional bribe(s).
const int& cpp_client::anarchy::Building::x |
|
inherited |
The location of the Building along the x-axis.
const int& cpp_client::anarchy::Building::y |
|
inherited |
The location of the Building along the y-axis.
The documentation for this class was generated from the following file: