The Battle for Wesnoth  1.19.7+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 48 of file recruitment.hpp.

Constructor & Destructor Documentation

◆ data()

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

Definition at line 61 of file recruitment.hpp.

Member Function Documentation

◆ get_normalized_scores()

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

◆ get_score_sum()

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

Definition at line 63 of file recruitment.hpp.

References scores.

Referenced by get_normalized_scores().

◆ to_string()

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

Definition at line 103 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 59 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: