pub fn generate() -> Self {
        let mut grid = Self {
            living: HashSet::new(),
        };
        for i in -50..50 {
            for j in -20..20 {
                if rand::random() {
                    grid.living.insert(index!(i, j));
                }
            }
        }
        grid
    }
/// Creates a new grid with a random seed.
///
/// ### Notes
/// The seed, of course, is not truly random, so probably don't use it as an entropy source.
Creates a new grid with a random seed.
Creates a new grid with a random seed .
pub fn generate() -> Self {
        let mut grid = Self {
            living: HashSet::new(),
        };
        for i in -50..50 {
            for j in -20..20 {
                if rand::random() {
                    grid.living.insert(index!(i, j));
                }
            }
        }
        grid
    }
pub fn generate ( ) -> Self { let mut grid = Self { living : HashSet :: new ( ) , } ; for i in - 50 .. 50 { for j in - 20 .. 20 { if rand :: random ( ) { grid . living . insert ( index ! ( i j ) ) ; } } } grid }
Creates a new grid with a random seed.
Creates a new grid with a random seed .
notes
The seed, of course, is not truly random, so probably don't use it as an entropy source.
The seed of course is not truly random so probably don ' t use it as an entropy source .