Commit Graph
31 Commits
Author SHA1 Message Date
Codex ce1535fe2d Create real careers from the native wizard and preserve manager presentation (by Codex) 2026-10-29 01:11:41 +01:00
Codex 6b4aa9772d Bind cup reports and linked competition phases to live engine data (by Codex) 2026-10-28 23:03:36 +01:00
Codex f9e8719b2d Fix Almanac shoot-out recording and verified legacy views (by Codex) 2026-10-28 20:42:40 +01:00
ClaudeandClaude Opus 5.5 cbde7b367e Reschedule undo clears the calendar replay bit (#16)
UndoReschedule of the original clears bit 0x4000 of the calendar day
(high byte & 0xbf) when no replay of another club stays on it; both cores
kept the bit, so the day and its neighbour were no longer offered as
targets after a move was taken back. Tests check the same target days
after the undo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 15:11:03 +01:00
ClaudeandClaude Opus 5.5 706577d002 Modern press journal: monthly results
At the first kickoff of a new month each club manager's cash change over
the month just ended becomes finance.profit or finance.loss. The month
and the cash at its start are saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 18:46:54 +01:00
ClaudeandClaude Opus 5.5 d6d31f939d Modern UI contract: the end of the game
Resigning as the only or last human ends the game as the end of the set
duration does: the highscore hook updates and shows the table. The end's
reason and date are saved; the session read follows the contract's
Session schema (archived managers, termination reason, ownership, mode),
managers become archived (resigned or retired) and their employments end
with the career. The resign answer carries the ownership change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 18:39:32 +01:00
ClaudeandClaude Opus 5.5 651d262546 Modern UI contract: press journal for business events
Business events cannot be derived from the almanac later, so a saved
journal notes them once: squad changes of the human clubs at a kickoff
(signed, free, sold, contract ended; clubs compared by identity across
the season's new draw positions), toto settlements, season change,
contract renewals and resigning. The news read merges it with the
almanac events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 18:22:50 +01:00
ClaudeandClaude Opus 5.5 d943494ef4 Modern UI contract: national friendlies
At the national coach's desk the friendly read quotes a match against
another nation on a copy of the Watcom generator (price, payer, ratings,
free dates); friendly.book draws the same ratings and books it. The
opponent bound of the national quote follows the world layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 14:24:47 +01:00
ClaudeandClaude Opus 5.5 d3d526c2e4 Modern UI contract: calendar read
club_calendar projects the season calendar of a club: the competitions
of each day and the club's league matches on the day of their round, or
on the replay day when moved or postponed. The calendar read lists a
date range of it with fixtures, status and results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 14:12:57 +01:00
ClaudeandClaude Opus 5.5 0046ab90d0 Modern: the traffic access has four stages
The Modern interface shows four stages for the traffic access, the original
has three. A Modern world (WorldLayout::traffic_stages = 4) keeps the
condition byte in steps of 64 (64, 128, 192, 255) and offers a build up to
stage 3; every stage weighs as one original stage. New careers convert the
original start table, older Modern saves are converted on load
(traffic_scale). Classic data keeps three stages; the Classic equivalence is
unchanged. Also: the live ticker takes the matches from the desk day on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 09:53:31 +01:00
ClaudeandClaude Opus 5.5 3336d01004 Modern UI contract: envelope, career and manager ids, session and desktop reads
First engine delivery for the Modern interface handoff (docs/new_ui/integration,
issue #15): ModernSession::ui_read answers in the draft envelope with careerId,
worldId, stateRevision, date, season, scope and Money in minor units. Careers and
human managers get persistent ids (saved in state/modern.json, older saves get
them on load). Reads: session and desktop. Engine decisions on the P0 points in
docs/new_engine/ui-anbindung.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 08:17:18 +01:00
ClaudeandClaude Opus 5.5 0f36b507d4 Modern: national teams play with squads of their nationality (M9)
A Modern layout gives every national team after no_team 24 squad slots.
On each national team day, after the German nomination, the strongest fit
players of each nationality (quotas 3/5/7/5, the German strength measure)
fill its squad and get a computer line-up; a nation without a goalkeeper
or with fewer than 14 nominees keeps its drawn rating. The shared match
core asks fields_players() instead of 'league club or no_team', which is
the same set in Classic. National squads get no cards or injuries, their
players develop after the match like Germany's, and the almanac records
their line-ups.

Diamond data 1.5: 24 of 61 nations play with players. Classic regression
(game 1 and two-player) unchanged, Classic-data season identical, save
round trip identical, ctest passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 15:02:50 +01:00
ClaudeandClaude Opus 5.5 d419943e86 Almanac format 3: matches column by column, line-ups against the previous one
Each match field of a season is stored as its own column and every player
of a line-up as his slot in the club's previous line-up. Deflate then
finds the repeats: a half season shrinks from 294 to 218 KB in the save.
Versions 1 and 2 are still read; tests cover a hand-built version 2 season
and a reordered line-up with a new player.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 12:48:00 +01:00
ClaudeandClaude Opus 5.5 ddaebec183 Almanac: record the matches of the German national team
The German national team shares its team number 357 with no_team, and the
recorder skipped it as a placeholder, so no international match of Germany
reached the almanac. Its line-up comes from the national squad while a
human is the national coach, as in the match engine. modern_season_sim
MODERN_ALMANAC_TEAM=<name> lists a team's recorded matches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 12:43:54 +01:00
ClaudeandClaude Opus 5.5 0cace5a984 Lower the exclusive sponsor to 1.5 times the best regular offer
Measured with twice the offer, four boards brought a top club about 5 million a year and the dearest camp paid off clearly on average; at 150 % it is about 3.8-4 million, roughly break-even for Dubai with luck on top. Default sponsor_bonus is now 150 (data format F4).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 09:25:17 +01:00
ClaudeandClaude Opus 5.5 77d1f93e8f Exclusive sponsor from training camp stays (Modern)
The Middle East camps share their grades but differ in price; a stay
can now bring an exclusive sponsor: 15 / 30 / 45 % per stay (Doha /
Abu Dhabi / Dubai), a shirt (about every third offer) or four boards at
twice the club's best regular offer for 12 months. Accepted on a free
place it starts at once, otherwise it is queued and starts at a month
change once the place is free. The offer goes through the regular
advertising acceptance.

Camp fields sponsor_chance / sponsor_bonus / sponsor_months (data
format F4, editable; built-in values for the Middle East camps), state
saved in state/modern.json, read query {kind: "sponsor"}, session action
dispatch_exclusive_sponsor, tests in modern_camp_tests, SIM_SPONSOR=1.
Sponsor artwork does not exist yet (asset: null, documented).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 09:15:38 +01:00
ClaudeandClaude Opus 5.5 44a7a77915 Accept data revision 1.4: real ages for all players (M5)
Revision 1.4 of the Modern data set brings birth dates for every
player, the camp catalogue with its maps and 100 referees. The
expansion now takes the age from a birth date for the original players
as well (WorldPlayer::born); before, only the added players kept their
data age. The yearly aging stops at 47, the most the age bits hold, so
real ages (a goalkeeper of 40) cannot run into the bits above. The
season sim counts second referee assignments per day.

Two seasons and ten seasons run through; the save round trip is
identical; second referee assignments drop to about 7 a season.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 08:54:21 +01:00
ClaudeandClaude Opus 5.5 0aa0ed68ca Toto with up to six columns (Modern)
Each column costs the stake (10,000-400,000) and is settled on its own
with the original quotas; all columns stake 400,000 at most, every
column beyond the first adds a 10 % fee, no two columns alike. Column 1
stays on the original coupon; columns 2-6 and the last settlement live
in ModernState::pools and are saved. Session action
dispatch_pools_columns, read query {kind: "toto"}, unit test
modern_toto_tests, SIM_TOTO=<columns> in the season sim.

Measured over two seasons: 1 column returns 30-71 %, 6 columns 12-49 %
of the stakes; more columns win more often, never on average.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 11:06:57 +02:00
ClaudeandClaude Opus 5.5 4639fe5a91 Add the base read queries for the new UI; fix ages and save limits
- ModernSession::read(request): status, leagues, table, fixtures and
  squad as JSON with the same club/player/league objects everywhere
  (docs/new_engine/ui-abfragen.md); the statistics answer through it.
  Further queries follow per menu once the GUI is finished.
- Ages: data set 1.3 gives ages only for the 840 added players (birth
  dates); the 2574 original players carry the placeholder 16 and now
  get their age drawn as in the original (human squad 20-25) instead
  of all being 16. Birth dates for all players go into data 1.4.
- Saves of Modern matchdays with more than six match groups (nine
  leagues on one day) were refused on loading; Classic keeps six.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 10:52:44 +02:00
ClaudeandClaude Opus 5.5 3d6dfc61e0 Draw player skills like the original when the data set has none (M7)
The data set gives no skills (all 0, x-legacy skill words included): the
original draws them at the career start. Keeping them left every player
without skills and cost 0.1-0.5 goals per match in every competition.
Data set players keep their age; their skills are drawn unless a data
set provides some. Goals per competition now match Classic data.

MODERN_VALUES=1 prints form, skills and market values per league; the
almanac summary shows goals per match per competition. Market values,
the added players' values and the human club's finances are measured
in balance.md (no change needed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 10:34:48 +02:00
ClaudeandClaude Opus 5.5 edd59db604 Let foreign Modern clubs buy players; ten-season runs (M7)
The original lets foreign clubs (16 squad slots) take players up to 15;
Modern foreign clubs have 20 players in 24 slots and never bought, so
after about five seasons the German squads were full and a transfer
found no club. Clubs with 24 slots now take players up to 21 like the
German ones; Classic squads keep the original limit.

Three ten-season Modern careers now run through without errors; goals
per match 2.70-2.77, league drift as with Classic data (documented in
balance.md). MODERN_ALMANAC_SUMMARY=1 prints the almanac on Classic data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 10:10:58 +02:00
ClaudeandClaude Opus 5.5 2a59d398fb Keep data set ages, fix camp booking, measure camp effect (M7)
- Players of the data set keep their age and seven skills at the career
  start; the original draws new ones (and OR-ed ages produced players
  of 46 and a crash once the draws were skipped).
- Training camps: the session allowed only resorts 0-7; the manager's
  club was read as a signed byte (clubs above 127 crashed); at the
  national coach's desk no camp can be booked.
- SIM_CAMP=<resort> in the season sim; the human club's final place is
  taken from the almanac. Twelve seeds: five stars +1.7 places, six
  stars +2.5 (about +0.8 over five stars at three times the price), so
  the six-star rules stay as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 10:06:51 +02:00
ClaudeandClaude Opus 5.5 4f6ec1e240 Rank Modern clubs by the data set's player values (M7)
The original draws new values for every league player at the career
start, so the data set's values were never calibrated for play; taken
as they are they give clubs far outside their league's strength
(spread 14-21 instead of about 6, 3.3 goals per match). In a Modern
world the clubs of a league now take the places of the league's
strength band in the order of the data set, and their players keep
their distances to the club level, compressed to the spread of
generated players. The human club and swapped clubs move as a whole.
Two seasons: 2.77 goals per match (original 2.67), plausible tables.

MODERN_SPREAD=1 prints the club strengths per league at the start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:41:06 +02:00
ClaudeandClaude Opus 5.5 7742d014f9 Add statistics queries for the Modern game statistics menu
ModernSession::read_statistics answers JSON requests evaluated from the
almanac: the competitions with results, the winners of every
competition by season, and player statistics per competition and season
or all-time (goals, assists, yellow, second yellow and red cards,
appearances). Replays of postponed league matches are now recorded as
matches of their league and original matchday. Engine texts with code
page 437 umlauts convert to UTF-8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:16:10 +02:00
ClaudeandClaude Opus 5.5 7c08e39607 Keep final tables and competition winners in the almanac
At the start of the season transition, before promotion moves the
clubs, the almanac stores the final table of every league (rank, games,
wins, draws, defeats, goals, points) and each league's champion and
runner-up. Every decided cup (national cup, European cups, supercup,
play-off, national tournaments, each indoor tournament and the Masters)
is noted with its date, last stage and runner-up. Almanac format
version 2; version 1 seasons are still read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:01:52 +02:00
ClaudeandClaude Opus 5.5 201eef88e4 Record every match in a football almanac (Modern, M8)
Modern careers keep every match they play: season, date, competition
type, league or cup stage, matchday, both clubs by world id with their
human managers, result with extra time and shoot-out, referee,
attendance, weather, both line-ups and all events (goals with assists
and kind, misses, cards, injuries, substitutions, shoot-out kicks).
Events come from the group event log the engine keeps for every match,
substitutions from the players on the pitch after each minute; nothing
draws random numbers (a 60-turn Modern run is unchanged).

Player indices reused for a new person get a new stable id. Saves hold
finished seasons as immutable history/season-<year>.bin files plus the
running season; modern-state@1.1 adds league names and the id counter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 23:49:13 +02:00
ClaudeandClaude Opus 5.5 57d75ab2f5 Read the referee pool from the world (M5, data format F9)
Referees are staff rows with role referee. Imported ones keep their
original property byte; added ones (attributes strictness and the new
perception, 0-3 each) follow the 49 originals in table order, up to 255.
The matchday draw uses the pool size; a second match per day remains the
fallback when the pool runs out. The season sim gains
MODERN_EXTRA_REFEREES=N for testing before data revision 1.4 exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 23:28:43 +02:00
ClaudeandClaude Opus 5.5 28b59d9890 Save and load Modern careers (M6)
Modern saves (save_profile modern-career-v1) name their world by id and
data revision and hold the career only; loading reinstalls the world
dimensions. Club names now follow promotion and relegation. The season
sim gains MODERN_SAVE_CHECK for a save/load round trip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 23:22:13 +02:00
ClaudeandClaude Opus 5.5 6f55622307 Load Modern worlds and add Modern training camps (M3, M4)
M3 - Modern world loader:
- modern/content/world: typed view of the world tables (leagues, clubs,
  players, nations, league dates, training camp catalogue).
- modern/content/world_package: opens a Modern world (runtime:modern-v1, or
  editor:world-v1 until data revision 1.4), reads only the engine entries and
  decodes the Classic payload (import: load_classic_payload).
- modern/content/world_expand: turns the Classic start into the world: club
  ids in the order of the world's leagues, per-club tables remapped (added
  clubs copy an original club of their league), added players from their
  attributes, 24 squad slots per league club, pools kept, layout, league
  sizes and league dates installed; UTF-8 names and OBW ids in ModernState.
- Fixes found by playing the Modern data set: referee pool exhausted on days
  with German and larger international leagues (Modern deviation), card
  table per league club grown, slot-to-team lookup via WorldLayout, form
  history stride from the layout, remaining slot literals.
- Classic UI projections used by the session read the layout instead of
  executable constants (Classic values unchanged).
- modern_season_sim opens .obw worlds; MODERN_DEBUG / MODERN_WATCH tracing.

M4 - training camps:
- Catalogue in ModernState (built-in 18 fictional camps on three maps, or the
  world's extended catalogue); price, booking and effect use it.
- Six-star grades: step index capped, limit +1 from pitch 5 and +1 with pitch
  and fitness 6, catering 6 one more point of condition, lodging 6 one week
  less injury. Classic data behaves as before. modern_camp_tests.

Verified: 190 tests pass; Classic replay regression identical to the M0
baseline; season_sim and modern_season_sim identical with Classic data; the
Modern data set plays full seasons (leagues 34/38/34 rounds).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:43:25 +02:00
ClaudeandClaude Opus 5.5 a4a37f1cb2 Modern: fixture table per league size, league dates and finished leagues (M2)
- schedule: kLeagueTablesPerLeague lets every league use the table of its own
  size (international leagues of 20 and 18 side by side); Classic leaves it off.
- Modern: a league that has played all its rounds sits out the remaining dates
  of its calendar group.
- modern/game/world_calendar: season days of ISO dates and placing a league
  group's dates in the season calendar around special days, with tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:24:43 +02:00
ClaudeandClaude Opus 5.5 f2fcb28f65 Fork the Classic season core into src/modern and add the world layout (M1)
- src/modern/game: the season modules as bmh::modern, working on ModernState
  (a GameState). Data types stay shared with Classic; Modern code calls its
  season functions qualified (modern::...), so a missing Modern function is a
  compile error instead of a silent call into Classic.
- src/modern/app/modern_session: the session on the Modern core. It still uses
  the Classic UI projections until the Modern projections exist.
- SeasonHooks: the shared match core reaches player statistics and the table
  prediction of the season core that owns the game (Classic: unchanged).
- WorldLayout: team ranges, squad slots and pools of the running world. Shared
  code and the Modern fork read them; Classic keeps the original numbers.
- Transfer list views moved to game/transfer_offer_view.hpp (shared).
- tools/modern/check_fork_calls.sh, modern_season_sim and world_layout_tests.

Verified: Classic tests and replay regression unchanged; season_sim and
modern_season_sim produce identical output with Classic data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:08:54 +02:00