![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
Collaboration diagram for cma_yoloswag:Public Member Functions | |
| cma_yoloswag () | |
| ~cma_yoloswag () | |
| void | put_city_under_agent (struct city *pcity, const struct cm_parameter *const parameter) |
| void | release_city (struct city *pcity) |
| bool | is_city_under_agent (const struct city *pcity, struct cm_parameter *parameter) |
| bool | get_parameter (enum attr_city attr, int city_id, struct cm_parameter *parameter) |
| void | set_parameter (enum attr_city attr, int city_id, const struct cm_parameter *parameter) |
| void | handle_city (struct city *pcity) |
| The given city has changed. More... | |
| int | get_request () |
| void | result_came_from_server (int request) |
Private Member Functions | |
| struct city * | check_city (int city_id, struct cm_parameter *parameter) |
| Returns TRUE if the city is valid for CMA. More... | |
| bool | apply_result_on_server (struct city *pcity, std::unique_ptr< cm_result > &&result) |
| Change the actual city setting to the given result. More... | |
Private Attributes | |
| std::unique_ptr< cm_result > | cma_result_got |
| int | last_request |
| struct city * | xcity |
Definition at line 68 of file governor.cpp.
| cma_yoloswag::cma_yoloswag | ( | ) |
Definition at line 209 of file governor.cpp.
|
default |
|
private |
Change the actual city setting to the given result.
Returns TRUE iff the actual data matches the calculated one.
Definition at line 267 of file governor.cpp.
Referenced by handle_city().
|
private |
Returns TRUE if the city is valid for CMA.
Fills parameter if TRUE is returned. Parameter can be nullptr.
Definition at line 513 of file governor.cpp.
Referenced by handle_city(), and result_came_from_server().
| bool cma_yoloswag::get_parameter | ( | enum attr_city | attr, |
| int | city_id, | ||
| struct cm_parameter * | parameter | ||
| ) |
Definition at line 427 of file governor.cpp.
| int cma_yoloswag::get_request | ( | ) |
Definition at line 205 of file governor.cpp.
| void cma_yoloswag::handle_city | ( | struct city * | pcity | ) |
The given city has changed.
handle_city ensures that either the city follows the set CMA goal or that the CMA detaches itself from the city.
Definition at line 541 of file governor.cpp.
| bool cma_yoloswag::is_city_under_agent | ( | const struct city * | pcity, |
| struct cm_parameter * | parameter | ||
| ) |
Definition at line 412 of file governor.cpp.
| void cma_yoloswag::put_city_under_agent | ( | struct city * | pcity, |
| const struct cm_parameter *const | parameter | ||
| ) |
Definition at line 394 of file governor.cpp.
| void cma_yoloswag::release_city | ( | struct city * | pcity | ) |
Definition at line 405 of file governor.cpp.
| void cma_yoloswag::result_came_from_server | ( | int | request | ) |
Definition at line 217 of file governor.cpp.
| void cma_yoloswag::set_parameter | ( | enum attr_city | attr, |
| int | city_id, | ||
| const struct cm_parameter * | parameter | ||
| ) |
Definition at line 476 of file governor.cpp.
|
private |
Definition at line 89 of file governor.cpp.
Referenced by apply_result_on_server(), cma_yoloswag(), and result_came_from_server().
|
private |
Definition at line 90 of file governor.cpp.
Referenced by apply_result_on_server(), cma_yoloswag(), get_request(), and result_came_from_server().
|
private |
Definition at line 91 of file governor.cpp.
Referenced by apply_result_on_server(), cma_yoloswag(), and result_came_from_server().