author | alfadur |
Tue, 30 Oct 2018 19:05:52 +0300 | |
changeset 14053 | 2869c2ccb1b8 |
parent 14048 | cef0c685fda8 |
child 14072 | 8a0d69c16cad |
permissions | -rw-r--r-- |
14047 | 1 |
mod template_based; |
13929 | 2 |
|
13959
1fa905aa4cdb
move point struct into integral-geometry and use it to refactor a bit
alfadur
parents:
13929
diff
changeset
|
3 |
extern crate integral_geometry; |
14047 | 4 |
extern crate land2d; |
5 |
||
14048 | 6 |
pub struct LandGenerationParameters<T> { |
14047 | 7 |
zero: T, |
8 |
basic: T, |
|
9 |
} |
|
10 |
||
14048 | 11 |
pub trait LandGenerator { |
14047 | 12 |
fn generate_land<T: Copy + PartialEq, I: Iterator<Item = u32>>( |
13 |
&self, |
|
14 |
parameters: LandGenerationParameters<T>, |
|
15 |
random_numbers: &mut I, |
|
16 |
) -> land2d::Land2D<T>; |
|
17 |
} |
|
13959
1fa905aa4cdb
move point struct into integral-geometry and use it to refactor a bit
alfadur
parents:
13929
diff
changeset
|
18 |
|
13929 | 19 |
#[cfg(test)] |
20 |
mod tests { |
|
21 |
#[test] |
|
22 |
fn it_works() { |
|
23 |
assert_eq!(2 + 2, 4); |
|
24 |
} |
|
25 |
} |