pub fn evolve(&mut self) {
        // copy of self's board to evolve
        let mut future = GameBoard::new(self.height,self.width);
        future.update(self);
        // iterate through future copy (starts out same as self's)
        for i in 0..future.height {
            for j in 0..future.width {
                if self.board[i][j] == true { // if cell at location is live
                    future.evolve_live_cell(self, i, j);
                } else { // else if dead
                    future.evolve_dead_cell(self, i, j);
                }
            }
        }
    
        // copy board back into self
        self.update(&future);
    }
// evolves the elements of the board
evolves the elements of the board
evolves the elements of the board
pub fn evolve(&mut self) {
        // copy of self's board to evolve
        let mut future = GameBoard::new(self.height,self.width);
        future.update(self);
        // iterate through future copy (starts out same as self's)
        for i in 0..future.height {
            for j in 0..future.width {
                if self.board[i][j] == true { // if cell at location is live
                    future.evolve_live_cell(self, i, j);
                } else { // else if dead
                    future.evolve_dead_cell(self, i, j);
                }
            }
        }
        // copy board back into self
        self.update(&future);
    }
pub fn evolve ( & mut self ) { // copy of self's board to evolve let mut future = GameBoard :: new ( self . height , self . width ) ; future . update ( self ) ; // iterate through future copy (starts out same as self's) for i in 0 .. future . height { for j in 0 .. future . width { if self . board [ i ] [ j ] == true { // if cell at location is live future . evolve_live_cell ( self , i , j ) ; } else { // else if dead future . evolve_dead_cell ( self , i , j ) ; } } } // copy board back into self self . update ( & future ) ; }
evolves the elements of the board
evolves the elements of the board
&mut self