here_be_dragons/examples/example1.rs

18 lines
468 B
Rust
Raw Normal View History

2022-03-18 16:56:34 +00:00
use here_be_dragons::{
2020-10-17 16:25:16 +00:00
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);
}