here_be_dragons/examples/example1.rs
2020-10-19 21:35:24 +02:00

23 lines
493 B
Rust

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