feat(citygen): params validation, GenError, seeded rng helpers

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Jeffrey Wilcke
2026-10-12 16:42:32 +02:00
parent 40b6972664
commit 3a17d7e1cd
4 changed files with 216 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
//! City invariants.
use crate::world::City;
/// A broken invariant found by [`City::validate`].
#[derive(Clone, Debug, PartialEq)]
pub struct Violation(pub String);
impl City {
/// Checks the invariants every finished city must satisfy.
pub fn validate(&self) -> Result<(), Vec<Violation>> {
Ok(())
}
}