#include <ca_testing_recruitment.hpp>


Public Member Functions | |
| testing_recruitment_phase (rca_context &context, const config &cfg) | |
| virtual | ~testing_recruitment_phase () |
| virtual double | evaluate () |
| Evaluate the candidate action, resetting the internal state of the action. | |
| virtual void | execute () |
| Execute the candidate action. | |
Protected Member Functions | |
| void | do_recruit (int max_units_to_recruit, double quality_factor) |
Definition at line 44 of file ca_testing_recruitment.hpp.
| ai::testing_ai_default::testing_recruitment_phase::testing_recruitment_phase | ( | rca_context & | context, | |
| const config & | cfg | |||
| ) |
Definition at line 56 of file ca_testing_recruitment.cpp.
| ai::testing_ai_default::testing_recruitment_phase::~testing_recruitment_phase | ( | ) | [virtual] |
Definition at line 62 of file ca_testing_recruitment.cpp.
| void ai::testing_ai_default::testing_recruitment_phase::do_recruit | ( | int | max_units_to_recruit, | |
| double | quality_factor | |||
| ) | [protected] |
Definition at line 1017 of file ca_testing_recruitment.cpp.
References ai::testing_ai_default::ai_choose_best_recruits(), ai::testing_ai_default::ai_choose_recruits(), ai::readonly_context_proxy::check_recruit_action(), ai::testing_ai_default::potential_recruit::cost(), ERR_AI, ai::testing_ai_default::fake_team::fake_recruit(), ai::testing_ai_default::fake_team::get_current_qty(), ai::testing_ai_default::get_recruit_qualities(), ai::testing_ai_default::get_recruit_quality(), ai::side_context_proxy::get_side(), ai::testing_ai_default::fake_team::gold(), ai::testing_ai_default::potential_recruit::id(), LOG_AI, ai::testing_ai_default::potential_recruit::max_qty(), ai::testing_ai_default::fake_team::recruit_list(), statistics::recruit_unit(), ai::testing_ai_default::fake_team::reset(), ai::testing_ai_default::fake_team::side(), and resources::teams.
Referenced by execute().


| double ai::testing_ai_default::testing_recruitment_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 67 of file ca_testing_recruitment.cpp.
References ai::candidate_action::BAD_SCORE, ai::default_ai_context_proxy::count_free_hexes_in_castle(), unit_map::find_leader(), resources::game_map, ai::candidate_action::get_score(), ai::side_context_proxy::get_side(), and resources::units.

| void ai::testing_ai_default::testing_recruitment_phase::execute | ( | ) | [virtual] |
Execute the candidate action.
Implements ai::candidate_action.
Definition at line 1140 of file ca_testing_recruitment.cpp.
References do_recruit().

| Generated by doxygen 1.7.1 on Thu May 24 2012 01:19:15 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |