Exemplo de uso de Tabela de Decisões para o Kata Jogo da Vida realizado em 12 de agosto de 2009 na Reunião #28 do Dojo Rio
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.
Repetir para cada célula:
Repetir para cada linha e coluna:
O componente "gerar" transforma a matriz "grid" na matriz "next" gerar (grid(linhas, colunas)) => next(linhas, colunas):