63 virtual std::string
get_id()
const;
64 virtual std::string
get_name()
const;
98 if (stage_factories==
nullptr) {
101 return *stage_factories;
112 get_list().emplace(name,ptr_to_this);
118 template<
class STAGE>
127 stage_ptr a = std::make_shared<STAGE>(context, cfg);
virtual bool do_play_stage()
Play the turn - implementation.
idle_stage(ai_context &context, const config &cfg)
virtual stage_ptr get_new_instance(ai_context &context, const config &cfg)
register_stage_factory(const std::string &name)
virtual stage_ptr get_new_instance(ai_context &context, const config &cfg)=0
std::map< std::string, factory_ptr > factory_map
bool is_duplicate(const std::string &name)
stage_factory(const std::string &name)
static factory_map & get_list()
std::shared_ptr< stage_factory > factory_ptr
std::pair< const std::string, factory_ptr > factory_map_pair
int get_recursion_count() const
get the value of the recursion counter
recursion_counter recursion_counter_
virtual std::string get_engine() const
virtual std::string get_id() const
virtual ~stage()
Destructor.
bool play_stage()
Play the turn - strategy.
stage(ai_context &context, const config &cfg)
Constructor.
virtual bool do_play_stage()=0
Play the turn - implementation.
virtual config to_config() const
serialize
virtual void on_create()
Initialization.
virtual std::string get_name() const
A config object defines a single node in a WML file, with access to child nodes.
A component of the AI framework.
A small explanation about what's going on here: Each action has access to two game_info objects First...
std::shared_ptr< stage > stage_ptr