The bank as five pages: bank, properties, stocks, passbook and fellow managers

The hall with its hot spots is gone; each service is a page of its own with a
picture and its figures. The properties hang on an estate agent's board, and
what the club owns carries a stamp. The page for dealings between managers
appears only where more than one human plays.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-16 00:17:25 +01:00
1 parent e14b2f2374
commit 964a4ae35d
27 files changed
+407 -520

No files matched your search

+11 -5
View File
@@ -15,7 +15,7 @@ const std::vector<NotebookSection> &notebook_sections() {
{"team", "Mannschaft", {"lineup", "tactics", "training", "camp", "strengths", "scorers"}},
{"transfers", "Transfers", {"transfer", "contracts"}},
{"club", "Verein", {"stadium", "periphery", "environment", "advertising", "investments"}},
{"finance", "Finanzen", {"balance", "bank", "toto"}},
{"finance", "Finanzen", {"balance", "bank", "properties", "stocks", "savings", "players", "toto"}},
{"fixtures", "Spielplan", {"calendar", "league", "tables", "other", "friendlies", "postpone", "indoor"}},
{"records", "Statistik", {"statistics", "stat-trend", "stat-winners", "stat-records", "stat-players", "achievements", "almanac", "fairplay", "highscore"}},
{"inbox", "Posteingang", {"news"}},
@@ -26,7 +26,7 @@ std::string notebook_page_label(const std::string &route) {
static const std::map<std::string, std::string> labels = {
{"lineup", "Aufstellung"}, {"tactics", "Taktik"}, {"training", "Training"}, {"camp", "Trainingslager"}, {"strengths", "Stärken"},
{"scorers", "Spielerstatistik"}, {"transfer", "Transfermarkt"}, {"contracts", "Verträge"}, {"stadium", "Stadion"}, {"periphery", "Peripherie"}, {"environment", "Umfeld"},
{"advertising", "Werbung"}, {"investments", "Investitionen"}, {"balance", "Bilanz"}, {"bank", "Bank"}, {"toto", "Toto"}, {"calendar", "Kalender"}, {"league", "Ligaspiele"},
{"advertising", "Werbung"}, {"investments", "Investitionen"}, {"balance", "Bilanz"}, {"bank", "Bank"}, {"properties", "Immobilien"}, {"stocks", "Aktien"}, {"savings", "Sparbuch"}, {"players", "Spieler"}, {"toto", "Toto"}, {"calendar", "Kalender"}, {"league", "Ligaspiele"},
{"tables", "Tabellen"}, {"other", "Übrige Spiele"}, {"friendlies", "Testspiele"}, {"postpone", "Verlegen"}, {"indoor", "Halle"},
{"statistics", "Analyse"}, {"stat-trend", "Verlauf"}, {"stat-winners", "Sieger"}, {"stat-records", "Rekorde"}, {"stat-players", "Spieler"}, {"achievements", "Erfolge"}, {"almanac", "Almanach"}, {"fairplay", "Fairplay"}, {"highscore", "Highscore"},
{"news", "Nachrichten"}, {"settings", "Einstellungen"}, {"save", "Speichern"}, {"load", "Laden"}, {"newplayer", "Manager"}};
@@ -197,26 +197,32 @@ std::string App::notebook_shell(const std::function<bool(const std::string &)> &
out += btn("home-do", "<span class=\"nb-sub-face tone-n3\"></span><span class=\"nb-sub-number\">+</span>", "nb-sub add", "id=\"page-home-add\" data-id=\"new\" aria-label=\"Neue Seite\" style=\"transform:translateY(16dp) rotate(1deg);\"");
}
size_t n = 0;
// a marker the book does not show: the pages of the archive in the demo, and the page for
// dealings between managers where only one human plays
const bool alone = bank_players().size() < 2;
const auto hidden = [&](const char *r) { return (!engine_mode_ && std::string_view(r).starts_with("stat-")) || (alone && std::string_view(r) == "players"); };
const auto shown = size_t(std::count_if(section.routes.begin(), section.routes.end(), [&](const char *r) { return !hidden(r); }));
for (const char *r : section.routes) {
if (hidden(r)) continue;
// the statistics are one menu with several pages; the demo has only its first
const bool part = std::string_view(r).starts_with("stat-") || std::string_view(r) == "statistics";
if (!engine_mode_ && std::string_view(r).starts_with("stat-")) continue;
// the ground is one menu with two pages: the stadium and what stands around it
const bool ground = std::string_view(r) == "stadium" || std::string_view(r) == "periphery";
// so is advertising: the sponsors' contracts, and what the club invests itself
const bool commerce = std::string_view(r) == "advertising" || std::string_view(r) == "investments";
const bool here = ground ? menu_ == "stadium" && (stadium_view_.value("view", std::string("inside")) == "panorama") == (std::string_view(r) == "periphery")
: !bank_view_of(r).empty() ? menu_ == "bank" && bank_view_ == bank_view_of(r)
: commerce ? menu_ == "advertising" && (advertising_page_ == "investments") == (std::string_view(r) == "investments")
: part && engine_mode_ ? menu_ == "statistics" && statistics_page_ == r : notebook_menu() == r;
if (here) {
kicker = std::string(section.label) + " · " + std::to_string(n + 1) + " / " + std::to_string(section.routes.size());
kicker = std::string(section.label) + " · " + std::to_string(n + 1) + " / " + std::to_string(shown);
heading = notebook_page_label(r);
}
out += open(r, "<span class=\"nb-sub-face tone-" + std::string(sub_tones[n % sub_tones.size()]) + "\"></span><span class=\"nb-sub-number\">" + std::to_string(n + 1) + "</span><span class=\"nb-sub-label\">" + notebook_page_label(r) + "</span>",
std::string("nb-sub") + (here ? " active" : ""),
"id=\"page-" + std::string(r) + "\" aria-pressed=\"" + (here ? "true" : "false") + "\" style=\"transform:translateY(" + (here ? std::string("-13") : std::to_string(sub_rest[n % sub_rest.size()])) + "dp) rotate(" +
scalar(sub_turns[n % sub_turns.size()]) + "deg);\"",
enabled(part ? "statistics" : ground ? "stadium" : commerce ? "advertising" : r));
enabled(part ? "statistics" : ground ? "stadium" : commerce ? "advertising" : !bank_view_of(r).empty() ? "bank" : r));
++n;
}
}