|
Player12
An open source football management simulator
|
#include <cstdint>#include <map>#include <span>#include <utility>#include <vector>#include "global/languages.h"#include "global/types.h"Go to the source code of this file.
Classes | |
| struct | ScoutExpertise |
| Where a scout comes from and what he knows. More... | |
| struct | EffectFactor |
| One line of the breakdown, e.g. "Speaks Portuguese +10%". More... | |
| struct | ScoutEffectiveness |
| How well a scout will do on an assignment. More... | |
| struct | TargetCountry |
| A country covered by an assignment and the scout's history there. More... | |
Namespaces | |
| namespace | ScoutExpertiseModel |
| Generation of scout backgrounds and the effectiveness model. [P]. | |
Typedefs | |
| using | LanguageSet = std::uint32_t |
Enumerations | |
| enum class | SpokenLanguage : std::uint8_t { English = 0 , Italian , Spanish , French , German , Portuguese , Dutch , Russian , Swedish , Polish , Greek , Turkish , Arabic , Japanese , Chinese , Korean , Romanian , Croatian , Danish , Finnish , Norwegian , Slovak , Czech , Hungarian , Ukrainian , COUNT } |
| Languages a scout can speak (bit positions are persisted). More... | |
| enum class | Continent : std::uint8_t { Europe = 0 , NorthAmerica , SouthAmerica , Asia , COUNT } |
| Continents (values are shown, not persisted). More... | |
| enum class | EffectFactorKind : std::uint8_t { Judging , HomeCountry , KnowsLeague , KnowsCountry , SpeaksLanguage , LanguageBarrier , FarFromHome } |
| Kind of a line of the effectiveness breakdown. More... | |
Functions | |
| constexpr LanguageSet | languageBit (SpokenLanguage language) |
| constexpr bool | speaks (LanguageSet languages, SpokenLanguage language) |
| const char * | spokenLanguageKey (SpokenLanguage language) |
| const char * | continentKey (Continent continent) |
| SpokenLanguage | nativeLanguage (Language nationality) |
| Continent | homeContinent (Language nationality) |
| Language | countryNationality (LeagueID country) |
| SpokenLanguage | countryLanguage (LeagueID country) |
| Continent | countryContinent (LeagueID country) |
| ScoutExpertise | ScoutExpertiseModel::generate (Language nationality, std::uint64_t world_seed, std::uint32_t scout_id, std::span< const LeagueID > countries) |
| ScoutEffectiveness | ScoutExpertiseModel::compute (const ScoutExpertise &expertise, std::uint8_t judging_ability, std::span< const TargetCountry > countries, LeagueID league, std::uint32_t league_days) |
Variables | |
| constexpr float | ScoutExpertiseModel::MIN_MULTIPLIER = 0.6f |
| constexpr float | ScoutExpertiseModel::MAX_MULTIPLIER = 1.5f |
| constexpr float | ScoutExpertiseModel::JUDGING_PER_POINT = 0.004f |
| constexpr float | ScoutExpertiseModel::HOME_COUNTRY = 0.20f |
| constexpr float | ScoutExpertiseModel::KNOWS_LEAGUE = 0.20f |
| constexpr float | ScoutExpertiseModel::KNOWS_COUNTRY = 0.10f |
| constexpr float | ScoutExpertiseModel::SPEAKS_LANGUAGE = 0.10f |
| constexpr float | ScoutExpertiseModel::LANGUAGE_BARRIER = -0.15f |
| constexpr float | ScoutExpertiseModel::FAR_FROM_HOME = -0.10f |
| constexpr float | ScoutExpertiseModel::FULL_EXPERIENCE_DAYS = 365.0f |
| constexpr std::uint16_t | ScoutExpertiseModel::LANGUAGE_LEARNED_DAYS = 540 |
| constexpr std::uint16_t | ScoutExpertiseModel::MAX_LEAGUE_DAYS = 9'999 |
| using LanguageSet = std::uint32_t |
Bit set of SpokenLanguage values.
|
strong |
|
strong |
Kind of a line of the effectiveness breakdown.
|
strong |
| const char * continentKey | ( | Continent | continent | ) |
Language key of a continent ("SCOUT_CONTINENT_EUROPE"...).
| SpokenLanguage countryLanguage | ( | LeagueID | country | ) |
Country data of a league country, identified by its top league id (the root of the league tree, like ScoutTargetKind::Country).
|
constexpr |
| SpokenLanguage nativeLanguage | ( | Language | nationality | ) |
First language of a nationality.
|
constexpr |
| const char * spokenLanguageKey | ( | SpokenLanguage | language | ) |
Language key of a spoken language ("SCOUT_LANG_ENGLISH"...).