pub fn tick(&mut self)
    {
        let old_gen = self.clone();

        for x in 0..CELLS_PER_ROW {
            for y in 0..CELLS_PER_COL {
                let cell = old_gen.get_cell(x as i32, y as i32).unwrap();
                let neighbours = old_gen.get_neighbours(x, y);

                self.get_mut_cell(x, y).unwrap().state = Self::get_new_state(cell, neighbours);
            }
        }
    }
/// Runs the next generation of the automaton
Runs the next generation of the automaton
Runs the next generation of the automaton
pub fn tick(&mut self)
    {
        let old_gen = self.clone();
        for x in 0..CELLS_PER_ROW {
            for y in 0..CELLS_PER_COL {
                let cell = old_gen.get_cell(x as i32, y as i32).unwrap();
                let neighbours = old_gen.get_neighbours(x, y);
                self.get_mut_cell(x, y).unwrap().state = Self::get_new_state(cell, neighbours);
            }
        }
    }
pub fn tick ( & mut self ) { let old_gen = self . clone ( ) ; for x in 0 .. CELLS_PER_ROW { for y in 0 .. CELLS_PER_COL { let cell = old_gen . get_cell ( x as i32 , y as i32 ) . unwrap ( ) ; let neighbours = old_gen . get_neighbours ( x , y ) ; self . get_mut_cell ( x , y ) . unwrap ( ) . state = Self :: get_new_state ( cell , neighbours ) ; } } }
Runs the next generation of the automaton
Runs the next generation of the automaton
&mut self
&mut self