|
Player12
An open source football management simulator
|
Mentoring groups of the managed club. More...
#include <mentoring.h>
Public Member Functions | |
| MentoringError | createGroup (const GameData &gamedata, TeamID team_id, PlayerID mentor_id, std::uint32_t *id=nullptr) |
| MentoringError | addMentee (const GameData &gamedata, std::uint32_t group_id, PlayerID mentee_id) |
| MentoringError | removeMentee (std::uint32_t group_id, PlayerID mentee_id) |
| MentoringError | dissolve (std::uint32_t group_id) |
| void | onWeek (GameData &gamedata) |
| float | developmentMultiplier (const GameData &gamedata, PlayerID player_id) const |
| std::vector< MentoringGroup > | groupsFor (TeamID team_id) const |
| const MentoringGroup * | groupOf (PlayerID player_id) const |
| void | clear () |
| void | load (const std::shared_ptr< DatabaseConnection > &db_conn) |
| void | save (const std::shared_ptr< DatabaseConnection > &db_conn) const |
Private Member Functions | |
| MentoringGroup * | find (std::uint32_t group_id) |
| void | prune (const GameData &gamedata) |
Private Attributes | |
| std::vector< MentoringGroup > | all |
| std::uint32_t | next_id = 1 |
Mentoring groups of the managed club.
Groups lapse on their own when a member leaves the club or a youngster outgrows the scheme.
| MentoringError MentoringSystem::addMentee | ( | const GameData & | gamedata, |
| std::uint32_t | group_id, | ||
| PlayerID | mentee_id | ||
| ) |
| void MentoringSystem::clear | ( | ) |
| MentoringError MentoringSystem::createGroup | ( | const GameData & | gamedata, |
| TeamID | team_id, | ||
| PlayerID | mentor_id, | ||
| std::uint32_t * | id = nullptr |
||
| ) |
Creates a group led by mentor_id; returns its id through id.
| float MentoringSystem::developmentMultiplier | ( | const GameData & | gamedata, |
| PlayerID | player_id | ||
| ) | const |
Development multiplier of a player (1.0 when not mentored).
| MentoringError MentoringSystem::dissolve | ( | std::uint32_t | group_id | ) |
|
private |
| const MentoringGroup * MentoringSystem::groupOf | ( | PlayerID | player_id | ) | const |
Group containing a player as mentor or mentee (nullptr if none).
| std::vector< MentoringGroup > MentoringSystem::groupsFor | ( | TeamID | team_id | ) | const |
| void MentoringSystem::load | ( | const std::shared_ptr< DatabaseConnection > & | db_conn | ) |
| void MentoringSystem::onWeek | ( | GameData & | gamedata | ) |
Weekly nudges, morale and pruning of lapsed memberships.
|
private |
| MentoringError MentoringSystem::removeMentee | ( | std::uint32_t | group_id, |
| PlayerID | mentee_id | ||
| ) |
| void MentoringSystem::save | ( | const std::shared_ptr< DatabaseConnection > & | db_conn | ) | const |
|
private |
|
private |