equal
deleted
inserted
replaced
|
1 use rand::Rng; |
|
2 |
1 pub mod maze; |
3 pub mod maze; |
2 pub mod outline_template_based; |
4 pub mod outline_template_based; |
3 pub mod wavefront_collapse; |
5 pub mod wavefront_collapse; |
4 |
6 |
5 #[derive(Clone, Copy)] |
7 #[derive(Clone, Copy)] |
36 self.basic |
38 self.basic |
37 } |
39 } |
38 } |
40 } |
39 |
41 |
40 pub trait LandGenerator { |
42 pub trait LandGenerator { |
41 fn generate_land<T: Copy + PartialEq + Default, I: Iterator<Item = u32>>( |
43 fn generate_land<T: Copy + PartialEq + Default>( |
42 &self, |
44 &self, |
43 parameters: &LandGenerationParameters<T>, |
45 parameters: &LandGenerationParameters<T>, |
44 random_numbers: &mut I, |
46 prng: &mut impl Rng, |
45 ) -> land2d::Land2D<T>; |
47 ) -> land2d::Land2D<T>; |
46 } |
48 } |