/**
     * Create and initialize a new universe.
     */
Create and initialize a new universe.
Create and initialize a new universe .
pub fn new(width: u32, height: u32) -> Universe {
        utils::set_panic_hook();
        let size = (width * height) as usize;
        let mut cells = FixedBitSet::with_capacity(size);
        for i in 0..size {
            cells.set(i, random() < 0.3);
        }
        Universe {
            width,
            height,
            cells,
        }
    }
pub fn new ( width : u32 , height : u32 ) -> Universe { utils :: set_panic_hook ( ) ; let size = ( width * height ) as usize ; let mut cells = FixedBitSet :: with_capacity ( size ) ; for i in 0 .. size { cells . set ( i , random ( ) < 0.3 ) ; } Universe { width , height , cells , } }
Create and initialize a new universe.
Create and initialize a new universe .
width
u32
height
u32