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.
Você começa com uma matriz bidimensional de células, onde cada célula está viva ou morta. Nesta versão do problema, a matriz é finita, e não pode existir vida fora das bordas. Quando calcular a próxima geração da matriz, siga estas regras:
Escrever um programa que aceite uma matriz arbitrária de células, e tenha como saída uma matriz semelhante mostrando a próxima geração.