rust/landgen/src/lib.rs
changeset 14059 3185fb34f3b5
parent 14056 8a0d69c16cad
child 14074 abb42ba345b6
--- a/rust/landgen/src/lib.rs	Thu Nov 01 01:07:26 2018 +0100
+++ b/rust/landgen/src/lib.rs	Thu Nov 01 03:38:13 2018 +0300
@@ -1,4 +1,4 @@
-mod template_based;
+pub mod template_based;
 
 extern crate integral_geometry;
 extern crate land2d;
@@ -9,6 +9,12 @@
     basic: T,
 }
 
+impl <T: Copy + PartialEq> LandGenerationParameters<T> {
+    pub fn new(zero: T, basic: T) -> Self {
+        Self { zero, basic }
+    }
+}
+
 pub trait LandGenerator {
     fn generate_land<T: Copy + PartialEq, I: Iterator<Item = u32>>(
         &self,