here_be_dragons/examples/example1.rs
2022-03-18 11:56:34 -05:00

18 lines
468 B
Rust

use here_be_dragons::{
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);
}