#include <gamestate_observer.hpp>
Public Member Functions | |
gamestate_observer () | |
virtual | ~gamestate_observer () |
void | handle_generic_event (const std::string &event_name) |
bool | is_gamestate_changed () |
Check if the gamestate has changed since last reset reset is done once on construction, and can be done by hand via reset() method. More... | |
void | reset () |
Reset the counter of gamestate changes. More... | |
![]() | |
virtual | ~observer () |
Private Attributes | |
int | gamestate_change_counter_ |
Definition at line 27 of file gamestate_observer.hpp.
ai::gamestate_observer::gamestate_observer | ( | ) |
Definition at line 27 of file gamestate_observer.cpp.
References ai::manager::add_gamestate_observer().
|
virtual |
Definition at line 34 of file gamestate_observer.cpp.
References ai::manager::remove_gamestate_observer().
|
virtual |
Implements events::observer.
Definition at line 40 of file gamestate_observer.cpp.
References gamestate_change_counter_.
bool ai::gamestate_observer::is_gamestate_changed | ( | ) |
Check if the gamestate has changed since last reset reset is done once on construction, and can be done by hand via reset() method.
Definition at line 46 of file gamestate_observer.cpp.
References gamestate_change_counter_.
Referenced by ai::ai_default_rca::candidate_action_evaluation_loop::do_play_stage(), and ai::lua_stage_wrapper::do_play_stage().
void ai::gamestate_observer::reset | ( | ) |
Reset the counter of gamestate changes.
Definition at line 52 of file gamestate_observer.cpp.
References gamestate_change_counter_.
|
private |
Definition at line 54 of file gamestate_observer.hpp.
Referenced by handle_generic_event(), is_gamestate_changed(), and reset().