2020-10-17 16:25:16 +00:00
|
|
|
use mapgen::{
|
|
|
|
filter::{
|
2022-03-12 20:31:30 +00:00
|
|
|
AreaStartingPosition, CellularAutomata, CullUnreachable, NoiseGenerator, XStart, YStart,
|
2020-10-17 16:25:16 +00:00
|
|
|
},
|
2022-03-12 20:31:30 +00:00
|
|
|
MapBuilder, NoData,
|
2020-10-17 16:25:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
fn main() {
|
2022-03-12 15:45:42 +00:00
|
|
|
let map = MapBuilder::<NoData>::new(20, 20)
|
2020-10-17 16:25:16 +00:00
|
|
|
.with(NoiseGenerator::uniform())
|
|
|
|
.with(CellularAutomata::new())
|
|
|
|
.with(AreaStartingPosition::new(XStart::CENTER, YStart::CENTER))
|
2020-10-19 19:35:24 +00:00
|
|
|
.with(CullUnreachable::new())
|
2022-03-12 20:31:30 +00:00
|
|
|
.build();
|
|
|
|
|
|
|
|
println!("{:}", &map);
|
|
|
|
}
|