Four further properties at the bank; the tactics sketch sits a little higher

Town house, penthouse, estate house and old terraced house join the six
properties of the original: bought and sold at the day's price, moving by
a few percent every month and paying a monthly rent. The property board
shows all ten.

Engine: estates.hpp, bank read funds fund:6-9, bank.commit trades them;
saved in state/modern.json.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-17 17:18:31 +01:00
1 parent 72e06aabdb
commit 57b8b0f371
18 files changed
+302 -7

No files matched your search

+22
View File
@@ -194,6 +194,12 @@ void save_world_career(const std::filesystem::path& path, const World& world, co
return J(std::move(rows));
}()},
{"dismissals", state.dismissals},
{"estates", [&] {
A rows;
for (const auto& held : state.estates) rows.push_back(A{J(int64_t(held[0])), J(int64_t(held[1])), J(int64_t(held[2])), J(int64_t(held[3]))});
return J(std::move(rows));
}()},
{"estate_prices", A{J(int64_t(state.estate_prices[0])), J(int64_t(state.estate_prices[1])), J(int64_t(state.estate_prices[2])), J(int64_t(state.estate_prices[3]))}},
{"shirt_numbers", [&] {
// only the players who have a number: [player, number] pairs
A rows;
@@ -288,6 +294,22 @@ SavedWorldCareer load_world_career(const std::filesystem::path& path, const Worl
if (const auto it = o->find("dismissals"); it != o->end() && std::holds_alternative<bool>(it->second.value))
out.state.dismissals = std::get<bool>(it->second.value);
}
// the four further properties (since 17 November 2026)
if (o->count("estates") && o->count("estate_prices")) {
for (const J& row : arr(get(modern, "estates"))) {
const A& held = arr(row);
if (held.size() != 4) fail("invalid properties");
std::array<uint16_t, 4> pieces{};
for (size_t k = 0; k < 4; ++k) {
if (num(held[k]) < 0 || num(held[k]) > 20) fail("invalid properties");
pieces[k] = uint16_t(num(held[k]));
}
out.state.estates.push_back(pieces);
}
const A& prices = arr(get(modern, "estate_prices"));
if (prices.size() != 4) fail("invalid property prices");
for (size_t k = 0; k < 4; ++k) out.state.estate_prices[k] = uint32_t(num(prices[k]));
}
// shirt numbers (since 17 November 2026)
if (o->count("shirt_numbers"))
for (const J& row : arr(get(modern, "shirt_numbers"))) {