smaller example1
This commit is contained in:
parent
3334184ad8
commit
89e9bf072e
|
@ -3,6 +3,7 @@ use mapgen::{
|
||||||
filter::{
|
filter::{
|
||||||
NoiseGenerator,
|
NoiseGenerator,
|
||||||
CellularAutomata,
|
CellularAutomata,
|
||||||
|
CullUnreachable,
|
||||||
AreaStartingPosition,
|
AreaStartingPosition,
|
||||||
XStart,
|
XStart,
|
||||||
YStart,
|
YStart,
|
||||||
|
@ -11,10 +12,11 @@ use mapgen::{
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let map = MapBuilder::new(80, 50)
|
let map = MapBuilder::new(20, 20)
|
||||||
.with(NoiseGenerator::uniform())
|
.with(NoiseGenerator::uniform())
|
||||||
.with(CellularAutomata::new())
|
.with(CellularAutomata::new())
|
||||||
.with(AreaStartingPosition::new(XStart::CENTER, YStart::CENTER))
|
.with(AreaStartingPosition::new(XStart::CENTER, YStart::CENTER))
|
||||||
|
.with(CullUnreachable::new())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
println!("{:}", &map);
|
println!("{:}", &map);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user