lib/game_of_life/board.rb
def reformat_for_next_generation!
      # create an array of dead cells and insert it as the first and last row of cells
      dead_cells = (1..@cells.first.size).map { Cell.new }
      # don't forget to deep copy the dead_cells
      @cells.unshift Marshal.load(Marshal.dump(dead_cells))
      @cells.push Marshal.load(Marshal.dump(dead_cells))

      # also insert a dead cell at the left and right of each row
      @cells.each do |row|
        row.unshift Cell.new
        row.push Cell.new
      end

      # validate to see if we broke the board
      validate
    end
def reformat_for_next_generation!
      # create an array of dead cells and insert it as the first and last row of cells
      dead_cells = (1..@cells.first.size).map { Cell.new }
      # don't forget to deep copy the dead_cells
      @cells.unshift Marshal.load(Marshal.dump(dead_cells))
      @cells.push Marshal.load(Marshal.dump(dead_cells))

      # also insert a dead cell at the left and right of each row
      @cells.each do |row|
        row.unshift Cell.new
        row.push Cell.new
      end

      # validate to see if we broke the board
      validate
    end
This is the first stage in a Game's #tick.
 @see Game#tick