#include <ca.hpp>


Public Member Functions | |
| goto_phase (rca_context &context, const config &cfg) | |
| virtual | ~goto_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 42 of file ca.hpp.
| ai::testing_ai_default::goto_phase::goto_phase | ( | rca_context & | context, | |
| const config & | cfg | |||
| ) |
| double ai::testing_ai_default::goto_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 62 of file ca.cpp.
References ai::candidate_action::BAD_SCORE, unit_map::begin(), ai::readonly_context_proxy::check_move_action(), gui2::distance(), distance_between(), unit_map::end(), unit_map::find(), resources::game_map, ai::readonly_context_proxy::get_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(), map_, move_, gamemap::on_board(), and resources::units.

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

Definition at line 53 of file ca.hpp.
Referenced by evaluate(), and execute().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:19:05 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |