Compute the next generation of a given grid
[B]=conway(A,cyc,fig)
matrix with configuration of the original grid
%t for infinite periodic arrangement or %f for finite grid
%t for diplaying plot
matrix with configuration of the next generation
conway computes the configuration of the next generation of a grid of square cells, each of which is in either live or dead. Each cell will be live or dead in the next generation according to the rules of the Conway's game of life: 1) A live cells with exactly 2 or 3 live neighbors stays a live cell, otherwise it dies. 2) A dead cell with 3 live neighbors becomes alive, otherwise is stays dead. By default, the grid is assumed to be finite. If cyc=%t is given, then grid is assumed to be infinite and periodic. By default, no plot is shown. If fig=%t is given, then a figure with two subplots is shown, the first subplot being the configuration of the original grid and the second subplot being the configuration of the next generations. conway is a main function of the game_of_life package for Scilab.