pub fn try_gen(&self, w: u32, h: u32) -> Option<Map> {
        // start at the bottom left
        let start = CoOrd { x: 0, y: 0 };

        // generate squares around that point.
        let mut map: Map = HashMap::new();

        if self.gen_adjacent_recursive(w, h, &mut map, start, start) {
            return Some(map);
        }
        None
    }
/// Try to generate a map with the current set of tiles.
/// Guarantees all restraints between tiles are satisfied however doesn't currently guarantee every tile will be present (TODO)
/// Panics if any relationships between tiles are invalid.
Try to generate a map with the current set of tiles.
Guarantees all restraints between tiles are satisfied however doesn't currently guarantee every tile will be present (TODO)
Panics if any relationships between tiles are invalid.
Try to generate a map with the current set of tiles . Guarantees all restraints between tiles are satisfied however doesn ' t currently guarantee every tile will be present ( TODO ) Panics if any relationships between tiles are invalid .
pub fn try_gen(&self, w: u32, h: u32) -> Option<Map> {
        // start at the bottom left
        let start = CoOrd { x: 0, y: 0 };
        // generate squares around that point.
        let mut map: Map = HashMap::new();
        if self.gen_adjacent_recursive(w, h, &mut map, start, start) {
            return Some(map);
        }
        None
    }
pub fn try_gen ( & self , w : u32 , h : u32 ) -> Option < Map > { // start at the bottom left let start = CoOrd { x : 0 , y : 0 } ; // generate squares around that point. let mut map : Map = HashMap :: new ( ) ; if self . gen_adjacent_recursive ( w , h , & mut map , start , start ) { return Some ( map ) ; } None }
Try to generate a map with the current set of tiles.
Try to generate a map with the current set of tiles .
&self
w
u32
h
u32