use ::rltk::RandomNumberGenerator; use super::{ AreaStartingPosition, BuilderChain, CellularAutomataBuilder, CullUnreachable, DistantExit, VoronoiSpawning, XStart, YStart, }; pub fn forest_builder( new_depth: i32, _rng: &mut RandomNumberGenerator, width: i32, height: i32, ) -> BuilderChain { let mut chain = BuilderChain::new(new_depth, width, height, "Into the Woods"); chain .start_with(CellularAutomataBuilder::new()) .with(AreaStartingPosition::new(XStart::Center, YStart::Center)) .with(CullUnreachable::new()) .with(AreaStartingPosition::new(XStart::Left, YStart::Center)); // Setup an exit and spawn mobs chain.with(VoronoiSpawning::new()).with(DistantExit::new()); chain }