Public Member Functions | Private Member Functions | Private Attributes

ai::testing_ai_default::retreat_phase Class Reference

#include <ca.hpp>

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

List of all members.

Public Member Functions

 retreat_phase (rca_context &context, const config &cfg)
virtual ~retreat_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

bool should_retreat (const map_location &loc, const unit_map::const_iterator &un, const move_map &srcdst, const move_map &dstsrc, double caution)

Private Attributes

move_result_ptr move_

Detailed Description

Definition at line 284 of file ca.hpp.


Constructor & Destructor Documentation

ai::testing_ai_default::retreat_phase::retreat_phase ( rca_context context,
const config cfg 
)

Definition at line 1700 of file ca.cpp.

ai::testing_ai_default::retreat_phase::~retreat_phase (  )  [virtual]

Definition at line 1705 of file ca.cpp.


Member Function Documentation

double ai::testing_ai_default::retreat_phase::evaluate (  )  [virtual]
void ai::testing_ai_default::retreat_phase::execute (  )  [virtual]

Execute the candidate action.

Implements ai::candidate_action.

Definition at line 1832 of file ca.cpp.

References ai::candidate_action::get_name(), LOG_AI_TESTING_AI_DEFAULT, and move_.

Here is the call graph for this function:

bool ai::testing_ai_default::retreat_phase::should_retreat ( const map_location loc,
const unit_map::const_iterator un,
const move_map srcdst,
const move_map dstsrc,
double  caution 
) [private]

Definition at line 1842 of file ca.cpp.

References ai::readonly_context_proxy::best_defensive_position(), resources::game_map, ai::readonly_context_proxy::get_enemy_dstsrc(), and ai::readonly_context_proxy::power_projection().

Referenced by evaluate().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 298 of file ca.hpp.

Referenced by evaluate(), and execute().


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:09 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs