#include <ca.hpp>


Public Member Functions | |
| move_leader_to_goals_phase (rca_context &context, const config &cfg) | |
| virtual | ~move_leader_to_goals_phase () |
| virtual double | evaluate () |
| Evaluate the candidate action, resetting the internal state of the action. | |
| virtual void | execute () |
| Execute the candidate action. | |
Private Member Functions | |
| void | remove_goal (const std::string &id) |
Private Attributes | |
| bool | auto_remove_ |
| map_location | dst_ |
| std::string | id_ |
| move_result_ptr | move_ |
Definition at line 137 of file ca.hpp.
| ai::testing_ai_default::move_leader_to_goals_phase::move_leader_to_goals_phase | ( | rca_context & | context, | |
| const config & | cfg | |||
| ) |
| ai::testing_ai_default::move_leader_to_goals_phase::~move_leader_to_goals_phase | ( | ) | [virtual] |
| double ai::testing_ai_default::move_leader_to_goals_phase::evaluate | ( | ) | [virtual] |
Evaluate the candidate action, resetting the internal state of the action.
| >0 | if the action is good | |
| <=0 | if the action is not good |
Implements ai::candidate_action.
Definition at line 629 of file ca.cpp.
References pathfind::a_star_search(), auto_remove_, ai::candidate_action::BAD_SCORE, ai::readonly_context_proxy::check_move_action(), ai::readonly_context_proxy::current_team(), pathfind::paths::destinations, dst_, config::empty(), ERR_AI_TESTING_AI_DEFAULT, unit_map::find_leader(), resources::game_map, ai::readonly_context_proxy::get_caution(), ai::readonly_context_proxy::get_enemy_dstsrc(), ai::readonly_context_proxy::get_leader_goal(), ai::candidate_action::get_name(), ai::candidate_action::get_score(), ai::side_context_proxy::get_side(), gamemap::h(), id_, LOG_AI_TESTING_AI_DEFAULT, move_, ai::readonly_context_proxy::power_projection(), remove_goal(), resources::state_of_game, pathfind::plain_route::steps, resources::teams, resources::units, unit_map::iterator_base< iter_types >::valid(), map_location::valid(), gamemap::w(), and WRN_AI_TESTING_AI_DEFAULT.

| void ai::testing_ai_default::move_leader_to_goals_phase::execute | ( | ) | [virtual] |
Execute the candidate action.
Implements ai::candidate_action.
Definition at line 708 of file ca.cpp.
References auto_remove_, dst_, ai::candidate_action::get_name(), id_, LOG_AI_TESTING_AI_DEFAULT, move_, and remove_goal().

| void ai::testing_ai_default::move_leader_to_goals_phase::remove_goal | ( | const std::string & | id | ) | [private] |
Definition at line 722 of file ca.cpp.
References ai::side_context_proxy::get_side(), and ai::manager::modify_active_ai_for_side().
Referenced by evaluate(), and execute().


Definition at line 151 of file ca.hpp.
Referenced by evaluate(), and execute().
Definition at line 152 of file ca.hpp.
Referenced by evaluate(), and execute().
std::string ai::testing_ai_default::move_leader_to_goals_phase::id_ [private] |
Reimplemented from ai::candidate_action.
Definition at line 153 of file ca.hpp.
Referenced by evaluate(), and execute().
Definition at line 154 of file ca.hpp.
Referenced by evaluate(), and execute().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:19:07 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |