#include <ca.hpp>


Public Member Functions | |
| move_leader_to_keep_phase (rca_context &context, const config &cfg) | |
| virtual | ~move_leader_to_keep_phase () |
| virtual double | evaluate () |
| Evaluate the candidate action, resetting the internal state of the action. | |
| virtual void | execute () |
| Execute the candidate action. | |
Private Attributes | |
| move_result_ptr | move_ |
Definition at line 159 of file ca.hpp.
| ai::testing_ai_default::move_leader_to_keep_phase::move_leader_to_keep_phase | ( | rca_context & | context, | |
| const config & | cfg | |||
| ) |
| ai::testing_ai_default::move_leader_to_keep_phase::~move_leader_to_keep_phase | ( | ) | [virtual] |
| double ai::testing_ai_default::move_leader_to_keep_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 744 of file ca.cpp.
References ai::candidate_action::BAD_SCORE, ai::readonly_context_proxy::check_move_action(), unit_map::count(), pathfind::paths::step::curr, ai::readonly_context_proxy::current_team(), pathfind::paths::destinations, distance_between(), unit_map::end(), unit_map::find(), unit_map::find_leader(), resources::game_map, ai::readonly_context_proxy::get_enemy_dstsrc(), ai::readonly_context_proxy::get_passive_leader(), ai::readonly_context_proxy::get_passive_leader_shares_keep(), ai::candidate_action::get_score(), ai::side_context_proxy::get_side(), move_, map_location::null_location, ai::readonly_context_proxy::suitable_keep(), resources::teams, and resources::units.

| void ai::testing_ai_default::move_leader_to_keep_phase::execute | ( | ) | [virtual] |
Execute the candidate action.
Implements ai::candidate_action.
Definition at line 808 of file ca.cpp.
References ai::candidate_action::get_name(), LOG_AI_TESTING_AI_DEFAULT, and move_.

Definition at line 171 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 |