author | unc0rr |
Sun, 28 Oct 2018 23:24:04 +0100 | |
changeset 14026 | 3b3d97ed2286 |
parent 13938 | 1fa905aa4cdb |
child 14027 | cef0c685fda8 |
permissions | -rw-r--r-- |
14026 | 1 |
mod template_based; |
13908 | 2 |
|
13938
1fa905aa4cdb
move point struct into integral-geometry and use it to refactor a bit
alfadur
parents:
13908
diff
changeset
|
3 |
extern crate integral_geometry; |
14026 | 4 |
extern crate land2d; |
5 |
||
6 |
struct LandGenerationParameters<T> { |
|
7 |
zero: T, |
|
8 |
basic: T, |
|
9 |
} |
|
10 |
||
11 |
trait LandGenerator { |
|
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 |
} |
|
13938
1fa905aa4cdb
move point struct into integral-geometry and use it to refactor a bit
alfadur
parents:
13908
diff
changeset
|
18 |
|
13908 | 19 |
#[cfg(test)] |
20 |
mod tests { |
|
21 |
#[test] |
|
22 |
fn it_works() { |
|
23 |
assert_eq!(2 + 2, 4); |
|
24 |
} |
|
25 |
} |