The Battle for Wesnoth  1.15.0-dev
Public Member Functions | Public Attributes | List of all members
ai::default_recruitment::data Struct Reference

#include <recruitment.hpp>

Public Member Functions

 data (const unit_map::const_iterator leader)
double get_score_sum () const
score_map get_normalized_scores () const
std::string to_string () const

Public Attributes

unit_map::const_iterator leader
std::set< std::string > recruits
score_map scores
double ratio_score
int recruit_count
bool in_danger

Detailed Description

Definition at line 47 of file recruitment.hpp.

Constructor & Destructor Documentation

◆ data()

ai::default_recruitment::data::data ( const unit_map::const_iterator  leader)

Definition at line 60 of file recruitment.hpp.

Member Function Documentation

◆ get_normalized_scores()

score_map ai::default_recruitment::data::get_normalized_scores ( ) const

◆ get_score_sum()

double ai::default_recruitment::data::get_score_sum ( ) const

Definition at line 62 of file recruitment.hpp.

◆ to_string()

std::string ai::default_recruitment::data::to_string ( ) const

Definition at line 100 of file recruitment.cpp.

References leader, ratio_score, recruit_count, s, and scores.

Referenced by ai::default_recruitment::recruitment::execute().

Member Data Documentation

◆ in_danger

bool ai::default_recruitment::data::in_danger

Definition at line 58 of file recruitment.hpp.

Referenced by ai::default_recruitment::recruitment::execute().

◆ leader

unit_map::const_iterator ai::default_recruitment::data::leader

◆ ratio_score

double ai::default_recruitment::data::ratio_score

◆ recruit_count

int ai::default_recruitment::data::recruit_count

◆ recruits

std::set<std::string> ai::default_recruitment::data::recruits

◆ scores

score_map ai::default_recruitment::data::scores

The documentation for this struct was generated from the following files: