The rules are fairly simple:
-
Any live cell with fewer than two live neighbors dies, as if caused by under-population.
-
Any live cell with two or three live neighbors lives on to the next generation.
-
Any live cell with more than three live neighbors dies, as if by overcrowding.
-
Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.
Assume that the method below is available and returns the number of living neighbors for a given cell.
get_living_neighbor_count(cell)
John Negron Robot Screwdriver LLC