|
Zappy Server
C++ game server: world, rules, scheduler, network
|
Represents the resources available in the game, including food and various minerals. More...
#include <Resources.hpp>
Collaboration diagram for Resources:Public Member Functions | |
| bool | isEmpty () const |
| int & | operator[] (size_t index) |
| const int & | operator[] (size_t index) const |
| int & | operator[] (ResourceType type) |
| const int & | operator[] (ResourceType type) const |
Static Public Member Functions | |
| static std::string | get_name (int index) |
| static std::optional< ResourceType > | fromName (std::string_view name) |
| static std::string | get_name (ResourceType type) |
| static float | density (ResourceType type) |
Public Attributes | |
| int | food = 0 |
| int | linemate = 0 |
| int | deraumere = 0 |
| int | sibur = 0 |
| int | mendiane = 0 |
| int | phiras = 0 |
| int | thystame = 0 |
Static Public Attributes | |
| static constexpr int | TYPE_COUNT = static_cast<int>(ResourceType::COUNT) |
Represents the resources available in the game, including food and various minerals.
Definition at line 17 of file Resources.hpp.
|
inlinestatic |
Definition at line 117 of file Resources.hpp.
References DERAUMERE, FOOD, LINEMATE, MENDIANE, PHIRAS, SIBUR, and THYSTAME.
Referenced by World::spawnResources().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 55 of file Resources.hpp.
References DERAUMERE, FOOD, LINEMATE, MENDIANE, PHIRAS, SIBUR, and THYSTAME.
Referenced by AiParser::parse().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 33 of file Resources.hpp.
Referenced by _tileContent(), LogObserver::onResourceDropped(), and LogObserver::onResourceTaken().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 67 of file Resources.hpp.
References get_name().
Referenced by get_name().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
|
inline |
Definition at line 113 of file Resources.hpp.
|
inline |
Definition at line 115 of file Resources.hpp.
|
inline |
|
inline |
| int Resources::deraumere = 0 |
Definition at line 21 of file Resources.hpp.
Referenced by _checkReqs(), isEmpty(), operator[](), operator[](), res(), and anonymous_namespace{LogObserver.cpp}::resStr().
| int Resources::food = 0 |
Definition at line 19 of file Resources.hpp.
Referenced by World::addPlayer(), World::consumeFood(), isEmpty(), operator[](), operator[](), res(), and anonymous_namespace{LogObserver.cpp}::resStr().
| int Resources::linemate = 0 |
Definition at line 20 of file Resources.hpp.
Referenced by _checkReqs(), isEmpty(), operator[](), operator[](), res(), and anonymous_namespace{LogObserver.cpp}::resStr().
| int Resources::mendiane = 0 |
Definition at line 23 of file Resources.hpp.
Referenced by _checkReqs(), isEmpty(), operator[](), operator[](), res(), and anonymous_namespace{LogObserver.cpp}::resStr().
| int Resources::phiras = 0 |
Definition at line 24 of file Resources.hpp.
Referenced by _checkReqs(), isEmpty(), operator[](), operator[](), res(), and anonymous_namespace{LogObserver.cpp}::resStr().
| int Resources::sibur = 0 |
Definition at line 22 of file Resources.hpp.
Referenced by _checkReqs(), isEmpty(), operator[](), operator[](), res(), and anonymous_namespace{LogObserver.cpp}::resStr().
| int Resources::thystame = 0 |
Definition at line 25 of file Resources.hpp.
Referenced by _checkReqs(), isEmpty(), operator[](), operator[](), res(), and anonymous_namespace{LogObserver.cpp}::resStr().
|
staticconstexpr |
Definition at line 138 of file Resources.hpp.
Referenced by _tileContent(), and World::spawnResources().