|
Player12
An open source football management simulator
|
Pure supporter rules (no game state), unit tested in isolation. More...
Functions | |
| SupporterMood | evaluate (const SupporterFacts &facts) |
| float | settle (float previous, float target) |
| float | boardNudge (float index) |
| const char * | moodKey (float index) |
| const char * | reasonKey (const SupporterReason &reason) |
Variables | |
| constexpr float | NEUTRAL = 55.0f |
| constexpr float | MAX_BOARD_NUDGE = 0.25f |
| constexpr float | BOARD_DEAD_ZONE = 15.0f |
| constexpr int | STAR_WINDOW_DAYS = 120 |
| constexpr int | STAR_RANK = 3 |
Pure supporter rules (no game state), unit tested in isolation.
| float SupporterModel::boardNudge | ( | float | index | ) |
Weekly nudge to the board's confidence: nothing within BOARD_DEAD_ZONE of 50, then linear up to +-MAX_BOARD_NUDGE at 0 and 100.
| SupporterMood SupporterModel::evaluate | ( | const SupporterFacts & | facts | ) |
The mood the facts point to: results against expectation weigh most (up to +-30), then derbies (+-12), ticket prices (-12 ... +6), star sales (-9 each, at most -18) and star signings (+5 each, at most +10).
| const char * SupporterModel::moodKey | ( | float | index | ) |
Language key describing the index ("SUPPORTERS_MOOD_CONTENT", ...).
| const char * SupporterModel::reasonKey | ( | const SupporterReason & | reason | ) |
Language key explaining reason ("SUPPORTERS_REASON_DERBY_WON", ...).
| float SupporterModel::settle | ( | float | previous, |
| float | target | ||
| ) |
Weekly step of the index towards target (moods change slowly).
|
inlineconstexpr |
Distance from 50 within which the board does not listen to the fans.
|
inlineconstexpr |
Largest weekly move of the board's confidence from the supporters.
|
inlineconstexpr |
Index of supporters with nothing to cheer or complain about.
|
inlineconstexpr |
Best players of the squad who count as stars.
|
inlineconstexpr |
How long a star sale or signing stays on the supporters' minds.