You start with a two dimensional grid of cells, where each cell is either alive or dead. In this version of the problem, the grid is finite, and no life can exist off the edges. When calculating the next generation of the grid, follow these rules:
You should write a program that can accept an arbitrary grid of cells, and will output a similar grid showing the next generation.