fix(cellular): perceive liquid deposits and commit every flush interval
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m32s
Foundation / postgres-tools (push) Successful in 27s
Foundation / server-image (push) Successful in 4m19s
Foundation / image (push) Successful in 4m53s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m32s
Foundation / postgres-tools (push) Successful in 27s
Foundation / server-image (push) Successful in 4m19s
Foundation / image (push) Successful in 4m53s
Region 10 showed no food: the habitat's perception treated only format 2 as pools and bubbles, so a format-3 habitat fell into the square-patch path, whose entries the server bridge skips. Format 3 is now perceived exactly like format 2. It also ran at 3-4 ticks per second: the cellular loop published every tick, and each publication writes the whole region payload (about 300 KB for 60 x 60 mm with 3,500 deposits) to the object store and commits it to PostgreSQL. The loop now keeps one session batch open and commits every flush interval (ADR-0089: 1 s, 20 ticks). Players see the batch's working state immediately; mutation offers and life endings still come from committed state, so choices stay durable. Births and mutation choices commit promptly in a fresh batch, a batch commits when demand ends, and it is dropped when the host loses authority or changes mode. Pacing follows the simulated tick, never backwards within an epoch. Refreshes the DEV session window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -161,7 +161,12 @@ class CellularBridge {
|
|||||||
static_cast<unsigned long long>(event.session), event.account.c_str(),
|
static_cast<unsigned long long>(event.session), event.account.c_str(),
|
||||||
static_cast<unsigned>(event.reason));
|
static_cast<unsigned>(event.reason));
|
||||||
}
|
}
|
||||||
void replicate(const server::CellularLives& state) {
|
// `state` is what players see (the session batch's working state between commits);
|
||||||
|
// mutation offers and life endings come only from `committed`, so a player can act on
|
||||||
|
// them durably. Without `committed`, both are the same state.
|
||||||
|
void replicate(const server::CellularLives& state,
|
||||||
|
const server::CellularLives* committed = nullptr) {
|
||||||
|
const auto& authority = committed ? *committed : state;
|
||||||
const auto tick = state.tick();
|
const auto tick = state.tick();
|
||||||
if (replicated_tick_ == tick)
|
if (replicated_tick_ == tick)
|
||||||
return;
|
return;
|
||||||
@@ -418,15 +423,20 @@ class CellularBridge {
|
|||||||
&network::CellularPerceivedProducer::organism);
|
&network::CellularPerceivedProducer::organism);
|
||||||
}
|
}
|
||||||
(void)sessions_->send_cellular_perception(network::AccountId{life.account}, view);
|
(void)sessions_->send_cellular_perception(network::AccountId{life.account}, view);
|
||||||
send_offer(state, life, tick);
|
const auto owned = std::ranges::find(
|
||||||
|
authority.lives(), life.identity.life,
|
||||||
|
[](const server::CellularOwnedLife& value) { return value.identity.life; });
|
||||||
|
if (owned != authority.lives().end())
|
||||||
|
send_offer(authority, *owned, authority.tick());
|
||||||
}
|
}
|
||||||
// After every owner's view: clear only the sessions that got none this tick.
|
// After every owner's view: clear only the sessions that got none this tick.
|
||||||
sessions_->clear_cellular_perceptions(tick);
|
sessions_->clear_cellular_perceptions(tick);
|
||||||
std::erase_if(offers_, [&](const SentOffer& sent) {
|
std::erase_if(offers_, [&](const SentOffer& sent) {
|
||||||
return std::ranges::find(state.lives(), sent.account,
|
return std::ranges::find(authority.lives(), sent.account,
|
||||||
&server::CellularOwnedLife::account) == state.lives().end();
|
&server::CellularOwnedLife::account) ==
|
||||||
|
authority.lives().end();
|
||||||
});
|
});
|
||||||
announce_endings(state);
|
announce_endings(authority);
|
||||||
// What each deposit held when last seen, for next tick's `drained` flags.
|
// What each deposit held when last seen, for next tick's `drained` flags.
|
||||||
deposit_stock_ = std::move(seen_stock_);
|
deposit_stock_ = std::move(seen_stock_);
|
||||||
seen_stock_.clear();
|
seen_stock_.clear();
|
||||||
|
|||||||
+155
-87
@@ -936,6 +936,11 @@ int serve_cellular(Options& o) {
|
|||||||
bool ready = false;
|
bool ready = false;
|
||||||
std::optional<server::HostPhase> phase;
|
std::optional<server::HostPhase> phase;
|
||||||
server::CellularTickSchedule schedule;
|
server::CellularTickSchedule schedule;
|
||||||
|
// The open session batch between commits, the actions it carries, and the monotone pace
|
||||||
|
// head per epoch (rules-12 regions commit every flush interval, not every tick).
|
||||||
|
std::optional<server::CellularSessionBatchBuilder> batch_builder;
|
||||||
|
std::vector<network::CarriedAction> batch_actions;
|
||||||
|
std::uint64_t pace_epoch = 0, pace_tick = 0;
|
||||||
std::vector<network::CarriedAction> awaiting_outcomes;
|
std::vector<network::CarriedAction> awaiting_outcomes;
|
||||||
// A tick that cannot be built is retried every 50 ms; name each distinct cause once.
|
// A tick that cannot be built is retried every 50 ms; name each distinct cause once.
|
||||||
std::optional<std::pair<std::string_view, server::CellularSessionBatchError>> stalled;
|
std::optional<std::pair<std::string_view, server::CellularSessionBatchError>> stalled;
|
||||||
@@ -1086,13 +1091,56 @@ int serve_cellular(Options& o) {
|
|||||||
std::chrono::steady_clock::now().time_since_epoch())
|
std::chrono::steady_clock::now().time_since_epoch())
|
||||||
.count());
|
.count());
|
||||||
};
|
};
|
||||||
const auto paced = schedule.observe(monotonic_us(), status.epoch,
|
// Pacing follows the simulated tick (the open batch's working state), never backwards
|
||||||
state ? state->tick() : status.committed_tick, needed,
|
// within an epoch: a discarded batch must not look like a head regression.
|
||||||
|
const auto simulated_tick = batch_builder ? batch_builder->candidate().tick()
|
||||||
|
: state ? state->tick()
|
||||||
|
: status.committed_tick;
|
||||||
|
if (status.epoch != pace_epoch) {
|
||||||
|
pace_epoch = status.epoch;
|
||||||
|
pace_tick = simulated_tick;
|
||||||
|
}
|
||||||
|
pace_tick = std::max(pace_tick, simulated_tick);
|
||||||
|
const auto paced = schedule.observe(monotonic_us(), status.epoch, pace_tick, needed,
|
||||||
status.ready && state, status.ecological_pending_ticks);
|
status.ready && state, status.ecological_pending_ticks);
|
||||||
if (!paced) {
|
if (!paced) {
|
||||||
std::puts("error cellular-schedule");
|
std::puts("error cellular-schedule");
|
||||||
return finish(4);
|
return finish(4);
|
||||||
}
|
}
|
||||||
|
const auto flush_ticks = std::clamp<std::uint64_t>(
|
||||||
|
static_cast<std::uint64_t>(o.host.flush_interval.count()) / 50, 1, 60);
|
||||||
|
const auto flush = [&] {
|
||||||
|
if (!batch_builder || batch_builder->batch().ticks.empty()) {
|
||||||
|
batch_builder.reset();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
auto published = host.publish(batch_builder->batch(), batch_builder->actions(),
|
||||||
|
batch_builder->mutation_actions());
|
||||||
|
if (published)
|
||||||
|
host.refuse_births(batch_builder->refused_births());
|
||||||
|
if (!published && host.status().phase != server::HostPhase::resolving) {
|
||||||
|
bridge->dropped(batch_actions, true);
|
||||||
|
std::erase_if(awaiting_outcomes, [&](const auto& action) {
|
||||||
|
return std::ranges::find(batch_actions, action) != batch_actions.end();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
batch_builder.reset();
|
||||||
|
batch_actions.clear();
|
||||||
|
deliver_finalized();
|
||||||
|
state = host.state(); // Publication replaced the committed state.
|
||||||
|
};
|
||||||
|
// A batch cannot outlive the authority or the raw mode it was built under; when demand
|
||||||
|
// ends, what it holds is committed.
|
||||||
|
if (batch_builder && (!status.ready || !state || host.population_mode())) {
|
||||||
|
bridge->dropped(batch_actions, true);
|
||||||
|
std::erase_if(awaiting_outcomes, [&](const auto& action) {
|
||||||
|
return std::ranges::find(batch_actions, action) != batch_actions.end();
|
||||||
|
});
|
||||||
|
batch_builder.reset();
|
||||||
|
batch_actions.clear();
|
||||||
|
} else if (batch_builder && !needed) {
|
||||||
|
flush();
|
||||||
|
}
|
||||||
if (status.ready && state && (needed || host.population_mode())) {
|
if (status.ready && state && (needed || host.population_mode())) {
|
||||||
if (host.population_mode()) {
|
if (host.population_mode()) {
|
||||||
if (paced->retry_ready && (paced->due || status.ecological_pending_ticks != 0)) {
|
if (paced->retry_ready && (paced->due || status.ecological_pending_ticks != 0)) {
|
||||||
@@ -1100,103 +1148,123 @@ int serve_cellular(Options& o) {
|
|||||||
if (!published)
|
if (!published)
|
||||||
schedule.defer(monotonic_us());
|
schedule.defer(monotonic_us());
|
||||||
}
|
}
|
||||||
} else if (paced->due && state->tick() != UINT64_MAX) {
|
} else {
|
||||||
const auto tick = state->tick() + 1;
|
// Rules 12 regions hold thousands of deposits, so their committed payload is
|
||||||
std::vector<server::CellularLifeIntent> baseline;
|
// large: commit every flush interval (ADR-0089: 1 s), not every tick. Players
|
||||||
baseline.reserve(state->lives().size());
|
// see the batch's working state at once; outcomes become final at its commit.
|
||||||
// ADR-0128: an owned life whose account holds no session here is frozen
|
// Births and mutation choices commit promptly, in their own fresh batch.
|
||||||
// (rules 5); the trace records the boundary, and its carried actions are
|
if (batch_builder && (!held_births.empty() || !host.queued_mutations().empty()))
|
||||||
// refused below.
|
flush();
|
||||||
const bool presence_rules =
|
const auto* current = batch_builder ? &batch_builder->candidate() : state;
|
||||||
state->rules_version() >= server::cellular_lives_presence_rules;
|
// A failed commit can leave the host without state until it recovers.
|
||||||
std::vector<server::LifeAccount> offline;
|
if (current && host.committed() && paced->due && needed &&
|
||||||
for (const auto& life : state->lives()) {
|
current->tick() != UINT64_MAX) {
|
||||||
server::CellularLifeIntent intent{life.identity.life, {}};
|
const auto tick = current->tick() + 1;
|
||||||
network::AccountId account;
|
std::vector<server::CellularLifeIntent> baseline;
|
||||||
account.bytes = life.account;
|
baseline.reserve(current->lives().size());
|
||||||
if (presence_rules && life.account != server::LifeAccount{} &&
|
// ADR-0128: an owned life whose account holds no session here is frozen
|
||||||
!bridge->sessions().holder(account)) {
|
// (rules 5); the trace records the boundary, and its carried actions are
|
||||||
intent.intent.frozen = true;
|
// refused below.
|
||||||
offline.push_back(life.account);
|
const bool presence_rules =
|
||||||
|
current->rules_version() >= server::cellular_lives_presence_rules;
|
||||||
|
std::vector<server::LifeAccount> offline;
|
||||||
|
for (const auto& life : current->lives()) {
|
||||||
|
server::CellularLifeIntent intent{life.identity.life, {}};
|
||||||
|
network::AccountId account;
|
||||||
|
account.bytes = life.account;
|
||||||
|
if (presence_rules && life.account != server::LifeAccount{} &&
|
||||||
|
!bridge->sessions().holder(account)) {
|
||||||
|
intent.intent.frozen = true;
|
||||||
|
offline.push_back(life.account);
|
||||||
|
}
|
||||||
|
baseline.push_back(intent);
|
||||||
}
|
}
|
||||||
baseline.push_back(intent);
|
std::ranges::sort(baseline, {}, &server::CellularLifeIntent::life_id);
|
||||||
}
|
// ADR-0125: wildlife follow the deterministic controller; its intentions
|
||||||
std::ranges::sort(baseline, {}, &server::CellularLifeIntent::life_id);
|
// ride the trace like a player's, and the owner validates them.
|
||||||
// ADR-0125: wildlife follow the deterministic controller; its intentions
|
if (const auto wild = server::wildlife_intents(*current, tick); wild) {
|
||||||
// ride the trace like a player's, and the owner validates them.
|
for (const auto& intent : *wild) {
|
||||||
if (const auto wild = server::wildlife_intents(*state, tick); wild) {
|
const auto found = std::ranges::lower_bound(
|
||||||
for (const auto& intent : *wild) {
|
baseline, intent.life_id, {}, &server::CellularLifeIntent::life_id);
|
||||||
const auto found = std::ranges::lower_bound(
|
if (found != baseline.end() && found->life_id == intent.life_id)
|
||||||
baseline, intent.life_id, {}, &server::CellularLifeIntent::life_id);
|
*found = intent;
|
||||||
if (found != baseline.end() && found->life_id == intent.life_id)
|
}
|
||||||
*found = intent;
|
|
||||||
}
|
}
|
||||||
}
|
auto actions = bridge->carry(tick);
|
||||||
auto actions = bridge->carry(tick);
|
if (!offline.empty()) {
|
||||||
if (!offline.empty()) {
|
std::vector<network::CarriedAction> departed;
|
||||||
std::vector<network::CarriedAction> departed;
|
std::erase_if(actions, [&](const network::CarriedAction& action) {
|
||||||
std::erase_if(actions, [&](const network::CarriedAction& action) {
|
if (std::ranges::find(offline, action.account.bytes) == offline.end())
|
||||||
if (std::ranges::find(offline, action.account.bytes) == offline.end())
|
return false;
|
||||||
return false;
|
departed.push_back(action);
|
||||||
departed.push_back(action);
|
return true;
|
||||||
return true;
|
});
|
||||||
});
|
bridge->dropped(departed, true);
|
||||||
bridge->dropped(departed, true);
|
|
||||||
}
|
|
||||||
auto builder =
|
|
||||||
server::CellularSessionBatchBuilder::create(*state, host.committed()->head);
|
|
||||||
if (!builder) {
|
|
||||||
report_stall("create", builder.error(), tick);
|
|
||||||
bridge->dropped(actions, true);
|
|
||||||
} else {
|
|
||||||
auto appended = builder->append_with_birth_refusals(
|
|
||||||
tick, baseline, actions, held_births, host.queued_mutations());
|
|
||||||
if (!appended && !actions.empty()) {
|
|
||||||
// ADR-0127: one account's unusable action (its life died, or it
|
|
||||||
// names an unperceived patch) refuses only that action, never the
|
|
||||||
// tick for every other player.
|
|
||||||
std::vector<network::CarriedAction> usable, refused;
|
|
||||||
for (const auto& action : actions)
|
|
||||||
(server::prepare_cellular_session_tick(*state, tick, baseline,
|
|
||||||
std::span{&action, 1})
|
|
||||||
? usable
|
|
||||||
: refused)
|
|
||||||
.push_back(action);
|
|
||||||
bridge->dropped(refused, true);
|
|
||||||
actions = std::move(usable);
|
|
||||||
appended = builder->append_with_birth_refusals(
|
|
||||||
tick, baseline, actions, held_births, host.queued_mutations());
|
|
||||||
}
|
}
|
||||||
if (!appended) {
|
if (!batch_builder) {
|
||||||
const auto lives = builder->last_lives_error();
|
auto created = server::CellularSessionBatchBuilder::create(
|
||||||
report_stall("append", appended.error(), tick,
|
*state, host.committed()->head);
|
||||||
lives ? static_cast<int>(*lives) : -1);
|
if (created)
|
||||||
|
batch_builder.emplace(std::move(*created));
|
||||||
|
else
|
||||||
|
report_stall("create", created.error(), tick);
|
||||||
|
}
|
||||||
|
if (!batch_builder) {
|
||||||
bridge->dropped(actions, true);
|
bridge->dropped(actions, true);
|
||||||
} else {
|
} else {
|
||||||
stalled.reset();
|
// Births and mutation choices only ever enter a fresh batch.
|
||||||
awaiting_outcomes.insert(awaiting_outcomes.end(), actions.begin(),
|
const bool fresh = batch_builder->batch().ticks.empty();
|
||||||
|
const std::span<const server::CellularTickIntents::Birth> births =
|
||||||
|
fresh ? std::span<const server::CellularTickIntents::Birth>{held_births}
|
||||||
|
: std::span<const server::CellularTickIntents::Birth>{};
|
||||||
|
const std::span<const persistence::CellularMutationReservation> mutations =
|
||||||
|
fresh ? host.queued_mutations()
|
||||||
|
: std::span<const persistence::CellularMutationReservation>{};
|
||||||
|
auto appended = batch_builder->append_with_birth_refusals(
|
||||||
|
tick, baseline, actions, births, mutations);
|
||||||
|
if (!appended && !actions.empty()) {
|
||||||
|
// ADR-0127: one account's unusable action (its life died, or it
|
||||||
|
// names an unperceived patch) refuses only that action, never the
|
||||||
|
// tick for every other player.
|
||||||
|
std::vector<network::CarriedAction> usable, refused;
|
||||||
|
for (const auto& action : actions)
|
||||||
|
(server::prepare_cellular_session_tick(*current, tick, baseline,
|
||||||
|
std::span{&action, 1})
|
||||||
|
? usable
|
||||||
|
: refused)
|
||||||
|
.push_back(action);
|
||||||
|
bridge->dropped(refused, true);
|
||||||
|
actions = std::move(usable);
|
||||||
|
appended = batch_builder->append_with_birth_refusals(
|
||||||
|
tick, baseline, actions, births, mutations);
|
||||||
|
}
|
||||||
|
if (!appended) {
|
||||||
|
const auto lives = batch_builder->last_lives_error();
|
||||||
|
report_stall("append", appended.error(), tick,
|
||||||
|
lives ? static_cast<int>(*lives) : -1);
|
||||||
|
bridge->dropped(actions, true);
|
||||||
|
flush(); // Commit what is good; the next tick starts afresh.
|
||||||
|
} else {
|
||||||
|
stalled.reset();
|
||||||
|
awaiting_outcomes.insert(awaiting_outcomes.end(), actions.begin(),
|
||||||
|
actions.end());
|
||||||
|
batch_actions.insert(batch_actions.end(), actions.begin(),
|
||||||
actions.end());
|
actions.end());
|
||||||
auto published = host.publish(builder->batch(), builder->actions(),
|
const bool prompt = !births.empty() || !mutations.empty();
|
||||||
builder->mutation_actions());
|
if (prompt || batch_builder->batch().ticks.size() >= flush_ticks)
|
||||||
if (published)
|
flush();
|
||||||
host.refuse_births(builder->refused_births());
|
|
||||||
if (!published && host.status().phase != server::HostPhase::resolving) {
|
|
||||||
bridge->dropped(actions, true);
|
|
||||||
std::erase_if(awaiting_outcomes, [&](const auto& action) {
|
|
||||||
return std::ranges::find(actions, action) != actions.end();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
deliver_finalized();
|
|
||||||
}
|
}
|
||||||
|
// Unappended work keeps its pacing debt; retry with bounded frequency.
|
||||||
|
const auto* after = batch_builder ? &batch_builder->candidate() : host.state();
|
||||||
|
if (!after || after->tick() < tick)
|
||||||
|
schedule.defer(monotonic_us());
|
||||||
}
|
}
|
||||||
// Only a confirmed head consumes pacing debt. Retry failures with bounded
|
|
||||||
// frequency while retaining debt; never reset a deadline to now + quantum.
|
|
||||||
if (!host.state() || host.state()->tick() < tick)
|
|
||||||
schedule.defer(monotonic_us());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (const auto* committed_state = host.state(); committed_state)
|
if (const auto* committed_state = host.state(); committed_state)
|
||||||
bridge->replicate(*committed_state);
|
bridge->replicate(batch_builder ? batch_builder->candidate() : *committed_state,
|
||||||
|
committed_state);
|
||||||
std::fflush(stdout);
|
std::fflush(stdout);
|
||||||
std::this_thread::sleep_for(2ms);
|
std::this_thread::sleep_for(2ms);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- {name: REGION_SESSION, value: "dev"}
|
- {name: REGION_SESSION, value: "dev"}
|
||||||
- {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"}
|
- {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"}
|
||||||
- {name: REGION_SESSION_WINDOW, value: "dev-20261021T234706-05bba866:1792640826"}
|
- {name: REGION_SESSION_WINDOW, value: "dev-20261022T014554-534aa212:1792647954"}
|
||||||
- {name: REGION_M10_MAX_GRANT_LIFETIME, value: "14400"}
|
- {name: REGION_M10_MAX_GRANT_LIFETIME, value: "14400"}
|
||||||
ports:
|
ports:
|
||||||
# QUIC (ADR-0090): UDP only; nothing listens on TCP 7400.
|
# QUIC (ADR-0090): UDP only; nothing listens on TCP 7400.
|
||||||
|
|||||||
@@ -184,7 +184,8 @@ CellularHabitat::perceive(CellularPosition position, std::uint32_t extent_um) co
|
|||||||
return std::unexpected{CellularHabitatError::outside_area};
|
return std::unexpected{CellularHabitatError::outside_area};
|
||||||
|
|
||||||
std::vector<CellularPatchPerception> visible;
|
std::vector<CellularPatchPerception> visible;
|
||||||
if (config_.format == cellular_habitat_deposit_format) {
|
if (config_.format == cellular_habitat_deposit_format ||
|
||||||
|
config_.format == cellular_habitat_liquid_format) {
|
||||||
// A deposit is visible when the gap from the footprint to its disc is within range.
|
// A deposit is visible when the gap from the footprint to its disc is within range.
|
||||||
for (const auto& patch : config_.patches) {
|
for (const auto& patch : config_.patches) {
|
||||||
const auto reach = std::uint64_t{cellular_trial_perception_radius_um} + patch.radius_um;
|
const auto reach = std::uint64_t{cellular_trial_perception_radius_um} + patch.radius_um;
|
||||||
|
|||||||
@@ -95,6 +95,21 @@ void format_three_round_trip() {
|
|||||||
CHECK(CellularHabitat::create(old));
|
CHECK(CellularHabitat::create(old));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A format-3 habitat is perceived as pools and bubbles, exactly like format 2.
|
||||||
|
void liquid_deposits_are_perceived() {
|
||||||
|
CellularPatch pool{{8'000, 8'000}, 2, energy(500), 2, 500, CellularDepositKind::pool};
|
||||||
|
pool.merged = 1;
|
||||||
|
const auto habitat = CellularHabitat::create(liquid({bubble(1, 5'100, 5'000), pool}));
|
||||||
|
CHECK(habitat);
|
||||||
|
const auto seen = (*habitat)->perceive({5'000, 5'000}, 20);
|
||||||
|
CHECK(seen && seen->size() == 2);
|
||||||
|
CHECK(std::ranges::any_of(*seen, [](const auto& p) {
|
||||||
|
return p.id == 1 && p.kind == CellularDepositKind::mote && p.radius_um == 30;
|
||||||
|
}));
|
||||||
|
CHECK(std::ranges::any_of(
|
||||||
|
*seen, [](const auto& p) { return p.id == 2 && p.kind == CellularDepositKind::pool; }));
|
||||||
|
}
|
||||||
|
|
||||||
void still_water_keeps_bubbles() {
|
void still_water_keeps_bubbles() {
|
||||||
const auto config = liquid({bubble(1, 5'000, 5'000), bubble(2, 9'000, 9'000)});
|
const auto config = liquid({bubble(1, 5'000, 5'000), bubble(2, 9'000, 9'000)});
|
||||||
const auto moved = advect(config, still());
|
const auto moved = advect(config, still());
|
||||||
@@ -210,6 +225,7 @@ void refusals() {
|
|||||||
int main() {
|
int main() {
|
||||||
try {
|
try {
|
||||||
format_three_round_trip();
|
format_three_round_trip();
|
||||||
|
liquid_deposits_are_perceived();
|
||||||
still_water_keeps_bubbles();
|
still_water_keeps_bubbles();
|
||||||
passing_cells_push_and_drift_decays();
|
passing_cells_push_and_drift_decays();
|
||||||
touching_bubbles_merge_up_to_the_cap();
|
touching_bubbles_merge_up_to_the_cap();
|
||||||
|
|||||||
Reference in New Issue
Block a user