rust/landgen/src/lib.rs
author unc0rr
Sun, 28 Oct 2018 23:24:04 +0100
changeset 14026 3b3d97ed2286
parent 13938 1fa905aa4cdb
child 14027 cef0c685fda8
permissions -rw-r--r--
Start land generators implementation

mod template_based;

extern crate integral_geometry;
extern crate land2d;

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

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