fix: review findings

- screen transitions snapshot the previous frame (ratatui swaps buffers
  after draw, so the old snapshot was always blank); frame loop extracted
  into a testable Runner
- .city loading rejects structurally inconsistent files: Grid deserialize
  checks size vs data, load_city checks header vs body and runs
  City::validate (now also checks Net link endpoints)
- saving from the map hands the live map screen back instead of a fresh
  explore screen
- signage glyphs covered by the unicode-width test

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Jeffrey Wilcke
2026-10-12 18:23:15 +02:00
parent 3c75674489
commit 59ba72f0e0
6 changed files with 286 additions and 41 deletions

View File

@@ -152,6 +152,14 @@ impl City {
}
}
for link in &self.net.links {
for id in [link.0, link.1] {
if id.index() >= self.net.nodes.len() {
out.push(Violation::NetAnchor(id));
}
}
}
for d in &self.districts {
let has_building = self.buildings.iter().any(|b| b.district == d.id);
let has_public = self.connectors.iter().any(|c| {