rust/landgen/src/lib.rs
author alfadur
Mon, 29 Oct 2018 23:38:08 +0300
changeset 14033 0f517cbfe16d
parent 14032 cef0c685fda8
child 14056 8a0d69c16cad
permissions -rw-r--r--
start a theme editor as an excuse to see land generator in action

mod template_based;

extern crate integral_geometry;
extern crate land2d;

pub struct LandGenerationParameters<T> {
    zero: T,
    basic: T,
}

pub trait LandGenerator {
    fn generate_land<T: Copy + PartialEq, I: Iterator<Item = u32>>(
        &self,
        parameters: LandGenerationParameters<T>,
        random_numbers: &mut I,
    ) -> land2d::Land2D<T>;
}

#[cfg(test)]
mod tests {
    #[test]
    fn it_works() {
        assert_eq!(2 + 2, 4);
    }
}