Struct cellular_maps::CellularMap
[−]
[src]
pub struct CellularMap { /* fields omitted */ }
Methods
impl CellularMap[src]
fn new(w: u32, h: u32) -> CellularMap[src]
Create a new CellularMap instance.
Arguments
w- The desired map width.h- The desired map height.
Example
use cellular_maps::CellularMap; // Create a 30x30 celular map. let mut cm = CellularMap::new(30,30);
fn get_width(self: &CellularMap) -> u32[src]
Get the map width.
fn get_height(self: &CellularMap) -> u32[src]
Get the map height.
fn get_element(self: &CellularMap, r: u32, c: u32) -> u8[src]
Get the element in position <r,c>.
fn random_fill(self: &mut CellularMap, wall_prob: u32)[src]
Initialize a random CellularMap.
fn evolve_default(self: &mut CellularMap)[src]
fn evolve(self: &mut CellularMap, _strategy: EvolveStrategy)[src]
Evolve the CellularMap according the automata rules.