mod common; mod simple_map; use crate::{Map, Position}; use common::*; use simple_map::SimpleMapBuilder; use specs::prelude::*; pub trait MapBuilder { fn build_map(&mut self, new_depth: i32) -> (Map, Position); fn spawn_entities(&mut self, map: &Map, ecs: &mut World, new_depth: i32); } pub fn random_builder() -> Box { // Note that until we have a second map type, this isn't even slightly random Box::new(SimpleMapBuilder {}) }