here_be_dragons/examples/example1.rs

18 lines
459 B
Rust
Raw Normal View History

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() {
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);
}