feat(cellular): playtest fixes - edge, cell count, mixed bubbles, still pools
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m29s
Foundation / postgres-tools (push) Successful in 29s
Foundation / server-image (push) Successful in 4m24s
Foundation / image (push) Successful in 4m58s

From the first rules-13 playtest:
- An earned offer waits until a single cell can split (keeping its count),
  so choices are no longer refused one after another.
- The client draws the region's walls (dimming outside), names the edge
  when the cell is against it, shows the region's cell count, and says when
  upkeep is burning kept matter because no energy is left.
- Mixed bubbles hold every nutrient at once (--mixed-motes; none leaves the
  scatter stream unchanged) and are drawn as small pools of their nutrients.
  With intake split by the body's recipe, single-nutrient phosphorus
  bubbles fed slowly; mixed ones carry it with everything else.
- Liquid openings move each pool out of the currents to the nearest still
  water (cellular_still_centre).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-26 09:02:43 -04:00
co-authored by Claude Opus 5.5
parent e2da92768c
commit 131ed5f254
14 changed files with 253 additions and 16 deletions
+30
View File
@@ -152,10 +152,40 @@ void invalid_configurations() {
const auto still = generate(none);
CHECK(still.routes().empty() && still.sample(30'000, 30'000) == CellularFlowSample{});
}
// A pool in a current moves to the nearest centre whose whole disc is still; one in still
// water stays.
void pools_rest_in_still_water() {
const auto field = generate(v0(7));
const auto disc_still = [&](CellularPatchAddress at, std::int64_t r) {
for (std::int64_t dx = -r; dx <= r; dx += r / 2)
for (std::int64_t dy = -r; dy <= r; dy += r / 2)
if (dx * dx + dy * dy <= r * r &&
field.sample(at.x_um + dx, at.y_um + dy) != CellularFlowSample{})
return false;
return true;
};
std::size_t moved{};
for (std::uint32_t x = 5'000; x <= 55'000; x += 5'000)
for (std::uint32_t y = 5'000; y <= 55'000; y += 5'000) {
const CellularPatchAddress at{x, y};
const auto rested = cellular_still_centre(field, at, 500);
if (field.sample(x, y) != CellularFlowSample{}) {
CHECK(rested != at && disc_still(rested, 500));
CHECK(rested.x_um >= 500 && rested.y_um >= 500 && rested.x_um <= 59'500 &&
rested.y_um <= 59'500);
++moved;
} else {
// Still at its centre: it stays, or moves only to clear a current at its rim.
CHECK(disc_still(rested, 500));
}
}
CHECK(moved != 0);
}
} // namespace
int main() {
try {
pools_rest_in_still_water();
routes_within_configuration();
bounded_with_quiet_water_and_still_walls();
route_centreline_runs_at_route_speed();