|
Player12
An open source football management simulator
|
#include <cstdint>#include <memory>#include <optional>#include <vector>#include "global/types.h"#include "model/gamedate.h"Go to the source code of this file.
Classes | |
| struct | SupporterFacts |
| Observable facts the supporters judge the club by. More... | |
| struct | SupporterReason |
| One factor and how many index points it is worth. More... | |
| struct | SupporterMood |
| The supporters' mood: a 0-100 index and why it is there. More... | |
| class | Supporters |
| The managed club's supporters: their mood is recomputed once a week from the facts and nudges the board's confidence a little. More... | |
Namespaces | |
| namespace | SupporterModel |
| Pure supporter rules (no game state), unit tested in isolation. | |
Enumerations | |
| enum class | SupporterFactor : std::uint8_t { Results = 0 , Derby , TicketPrice , StarSale , StarSigning , COUNT } |
| What moves the supporters (values are persisted). More... | |
Functions | |
| SupporterMood | SupporterModel::evaluate (const SupporterFacts &facts) |
| float | SupporterModel::settle (float previous, float target) |
| float | SupporterModel::boardNudge (float index) |
| const char * | SupporterModel::moodKey (float index) |
| const char * | SupporterModel::reasonKey (const SupporterReason &reason) |
Variables | |
| constexpr float | SupporterModel::NEUTRAL = 55.0f |
| constexpr float | SupporterModel::MAX_BOARD_NUDGE = 0.25f |
| constexpr float | SupporterModel::BOARD_DEAD_ZONE = 15.0f |
| constexpr int | SupporterModel::STAR_WINDOW_DAYS = 120 |
| constexpr int | SupporterModel::STAR_RANK = 3 |
|
strong |
What moves the supporters (values are persisted).
| Enumerator | |
|---|---|
| Results | League results against expectation. |
| Derby | This season's matches against the rival. |
| TicketPrice | Ticket price against the fair price. |
| StarSale | One of the best players was sold. |
| StarSigning | A signing who walks into the best players. |
| COUNT | |