Public Member Functions | Protected Member Functions

ai::testing_ai_default::testing_recruitment_phase Class Reference

#include <ca_testing_recruitment.hpp>

Inheritance diagram for ai::testing_ai_default::testing_recruitment_phase:
Inheritance graph
[legend]
Collaboration diagram for ai::testing_ai_default::testing_recruitment_phase:
Collaboration graph
[legend]

List of all members.

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)

Detailed Description

Definition at line 44 of file ca_testing_recruitment.hpp.


Constructor & Destructor Documentation

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.


Member Function Documentation

void ai::testing_ai_default::testing_recruitment_phase::do_recruit ( int  max_units_to_recruit,
double  quality_factor 
) [protected]
double ai::testing_ai_default::testing_recruitment_phase::evaluate (  )  [virtual]

Evaluate the candidate action, resetting the internal state of the action.

Returns:
the score
Return values:
>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.

Here is the call graph for this function:

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().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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