The Battle for Wesnoth  1.15.2+dev
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
team_builder Class Reference

Public Member Functions

 team_builder (const config &side_cfg, std::vector< team > &teams, const config &level, game_board &board, int num)
 
void build_team_stage_one ()
 
void build_team_stage_two ()
 

Protected Member Functions

void log_step (const char *s) const
 
void init ()
 
void gold ()
 
void new_team ()
 
void objectives ()
 
void previous_recruits ()
 
void handle_unit (const config &u, const char *origin)
 
void handle_leader (const config &leader)
 
void leader ()
 
void prepare_units ()
 
void place_units ()
 

Protected Attributes

int gold_info_ngold_
 
std::deque< configleader_configs_
 
const configlevel_
 
game_boardboard_
 
bool player_exists_
 
std::set< std::string > seen_ids_
 
int side_
 
const configside_cfg_
 
teamt_
 
std::vector< team > & teams_
 
std::vector< const config * > unit_configs_
 

Detailed Description

Definition at line 38 of file teambuilder.cpp.

Constructor & Destructor Documentation

◆ team_builder()

team_builder::team_builder ( const config side_cfg,
std::vector< team > &  teams,
const config level,
game_board board,
int  num 
)
inline

Definition at line 40 of file teambuilder.cpp.

Referenced by create_team_builder().

Member Function Documentation

◆ build_team_stage_one()

void team_builder::build_team_stage_one ( )
inline

◆ build_team_stage_two()

void team_builder::build_team_stage_two ( )
inline

Definition at line 84 of file teambuilder.cpp.

References place_units().

◆ gold()

void team_builder::gold ( )
inlineprotected

Definition at line 137 of file teambuilder.cpp.

References DBG_NG_TC, and log_step().

Referenced by build_team_stage_one().

◆ handle_leader()

void team_builder::handle_leader ( const config leader)
inlineprotected

◆ handle_unit()

void team_builder::handle_unit ( const config u,
const char *  origin 
)
inlineprotected

◆ init()

void team_builder::init ( )
inlineprotected

◆ leader()

void team_builder::leader ( )
inlineprotected

Definition at line 240 of file teambuilder.cpp.

References config::child_range(), handle_leader(), and log_step().

Referenced by build_team_stage_one().

◆ log_step()

void team_builder::log_step ( const char *  s) const
inlineprotected

Definition at line 108 of file teambuilder.cpp.

References LOG_NG_TC.

Referenced by gold(), init(), leader(), new_team(), objectives(), place_units(), and previous_recruits().

◆ new_team()

void team_builder::new_team ( )
inlineprotected

Definition at line 147 of file teambuilder.cpp.

References team::build(), gold_info_ngold_, log_step(), and game_board::map().

Referenced by build_team_stage_one().

◆ objectives()

void team_builder::objectives ( )
inlineprotected

◆ place_units()

void team_builder::place_units ( )
inlineprotected

◆ prepare_units()

void team_builder::prepare_units ( )
inlineprotected

Definition at line 258 of file teambuilder.cpp.

References config::child_range(), and handle_unit().

Referenced by build_team_stage_one().

◆ previous_recruits()

void team_builder::previous_recruits ( )
inlineprotected

Definition at line 165 of file teambuilder.cpp.

References team::add_recruit(), DBG_NG_TC, config::get(), log_step(), and utils::split().

Referenced by build_team_stage_one().

Member Data Documentation

◆ board_

game_board& team_builder::board_
protected

Definition at line 98 of file teambuilder.cpp.

Referenced by place_units().

◆ gold_info_ngold_

int team_builder::gold_info_ngold_
protected

Definition at line 94 of file teambuilder.cpp.

Referenced by new_team().

◆ leader_configs_

std::deque<config> team_builder::leader_configs_
protected

Definition at line 95 of file teambuilder.cpp.

◆ level_

const config& team_builder::level_
protected

Definition at line 97 of file teambuilder.cpp.

◆ player_exists_

bool team_builder::player_exists_
protected

Definition at line 100 of file teambuilder.cpp.

◆ seen_ids_

std::set<std::string> team_builder::seen_ids_
protected

Definition at line 101 of file teambuilder.cpp.

◆ side_

int team_builder::side_
protected

Definition at line 102 of file teambuilder.cpp.

◆ side_cfg_

const config& team_builder::side_cfg_
protected

Definition at line 103 of file teambuilder.cpp.

◆ t_

team* team_builder::t_
protected

Definition at line 104 of file teambuilder.cpp.

Referenced by build_team_stage_one().

◆ teams_

std::vector<team>& team_builder::teams_
protected

Definition at line 105 of file teambuilder.cpp.

◆ unit_configs_

std::vector<const config*> team_builder::unit_configs_
protected

Definition at line 106 of file teambuilder.cpp.


The documentation for this class was generated from the following file: