rust/landgen/src/lib.rs
author unc0rr
Wed, 31 Oct 2018 23:36:05 +0100
changeset 14051 8a0d69c16cad
parent 14027 cef0c685fda8
child 14054 3185fb34f3b5
permissions -rw-r--r--
Implement OutlinePoints for land generators, some ground work for template based landgen

mod template_based;

extern crate integral_geometry;
extern crate land2d;
extern crate itertools;

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);
    }
}