here_be_dragons/examples/example1.rs
2022-03-12 14:31:30 -06:00

18 lines
459 B
Rust

use mapgen::{
filter::{
AreaStartingPosition, CellularAutomata, CullUnreachable, NoiseGenerator, XStart, YStart,
},
MapBuilder, NoData,
};
fn main() {
let map = MapBuilder::<NoData>::new(20, 20)
.with(NoiseGenerator::uniform())
.with(CellularAutomata::new())
.with(AreaStartingPosition::new(XStart::CENTER, YStart::CENTER))
.with(CullUnreachable::new())
.build();
println!("{:}", &map);
}