A trivial ai that sits around doing absolutely nothing. More...
#include <ai.hpp>


Public Member Functions | |
| idle_ai (readwrite_context &context, const config &cfg) | |
| void | play_turn () |
| Function that is called when the AI must play its turn. | |
| void | new_turn () |
| Function called when a a new turn is played. | |
| std::string | describe_self () const |
| Describe self. | |
| void | switch_side (side_number side) |
| int | get_recursion_count () const |
| virtual config | to_config () const |
| serialize to config | |
Private Attributes | |
| const config & | cfg_ |
| recursion_counter | recursion_counter_ |
A trivial ai that sits around doing absolutely nothing.
Definition at line 43 of file ai.hpp.
| ai::idle_ai::idle_ai | ( | readwrite_context & | context, | |
| const config & | cfg | |||
| ) |
Definition at line 60 of file ai.cpp.
References ai::readwrite_context_proxy::init_readwrite_context_proxy().

| std::string ai::idle_ai::describe_self | ( | ) | const [virtual] |
| int ai::idle_ai::get_recursion_count | ( | ) | const |
Definition at line 91 of file ai.cpp.
References ai::recursion_counter::get_count(), and recursion_counter_.

| void ai::idle_ai::new_turn | ( | ) | [virtual] |
Function called when a a new turn is played.
Implements ai::interface.
| void ai::idle_ai::play_turn | ( | ) | [virtual] |
Function that is called when the AI must play its turn.
Derived classes should implement their AI algorithm in this function.
Implements ai::interface.
Definition at line 97 of file ai.cpp.
References game_events::fire().

| void ai::idle_ai::switch_side | ( | side_number | side | ) | [virtual] |
Implements ai::interface.
Definition at line 77 of file ai.cpp.
References ai::side_context_proxy::set_side().

| config ai::idle_ai::to_config | ( | ) | const [virtual] |
const config& ai::idle_ai::cfg_ [private] |
Definition at line 54 of file ai.hpp.
Referenced by get_recursion_count().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:18:54 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |