feat(citygen): params validation, GenError, seeded rng helpers
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
14
crates/citygen/src/validate.rs
Normal file
14
crates/citygen/src/validate.rs
Normal 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(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user