calculate previous generations for Conway's Game of Life