Public Member Functions | Private Attributes

ai::testing_ai_default::fallback_to_other_ai Class Reference

#include <stage_fallback.hpp>

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

List of all members.

Public Member Functions

 fallback_to_other_ai (ai_context &context, const config &cfg)
 ~fallback_to_other_ai ()
bool do_play_stage ()
 Play the turn - implementation.
void on_create ()
 Initialization.
config to_config () const
 serialize

Private Attributes

const configcfg_
ai_ptr fallback_ai_

Detailed Description

Definition at line 37 of file stage_fallback.hpp.


Constructor & Destructor Documentation

ai::testing_ai_default::fallback_to_other_ai::fallback_to_other_ai ( ai_context context,
const config cfg 
)

Definition at line 38 of file stage_fallback.cpp.

ai::testing_ai_default::fallback_to_other_ai::~fallback_to_other_ai (  ) 

Definition at line 79 of file stage_fallback.cpp.


Member Function Documentation

bool ai::testing_ai_default::fallback_to_other_ai::do_play_stage (  )  [virtual]

Play the turn - implementation.

Returns:
true only if game state has changed. Really only needed for ministages. Returning false is always safe.

Implements ai::stage.

Definition at line 67 of file stage_fallback.cpp.

References ERR_AI_TESTING_STAGE_FALLBACK, fallback_ai_, ai::side_context_proxy::get_side(), and LOG_AI_TESTING_STAGE_FALLBACK.

Here is the call graph for this function:

void ai::testing_ai_default::fallback_to_other_ai::on_create (  )  [virtual]

Initialization.

Deprecated:
1.9.3 backward-compatibility hack - try to update the old default ai config.

Reimplemented from ai::stage.

Definition at line 43 of file stage_fallback.cpp.

References cfg_, config::child_or_empty(), ai::manager::create_transient_ai(), fallback_ai_, ai::side_context_proxy::get_side(), and ai::configuration::parse_side_config().

Here is the call graph for this function:

config ai::testing_ai_default::fallback_to_other_ai::to_config (  )  const [virtual]

serialize

Reimplemented from ai::stage.

Definition at line 57 of file stage_fallback.cpp.

References config::add_child(), and fallback_ai_.

Here is the call graph for this function:


Member Data Documentation

Reimplemented from ai::stage.

Definition at line 50 of file stage_fallback.hpp.

Referenced by on_create().

Definition at line 52 of file stage_fallback.hpp.

Referenced by do_play_stage(), on_create(), and to_config().


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