Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
simple solution in Clear category for Moore Neighbourhood by mangeclous99
def count_neighbours(grid, row, col):
count = 0
tailleX = len (grid[0])
tailleY = len (grid)
for i in range(-1,2):
for j in range(-1,2):
if ((i,j)!=(0,0)) and (0<=row+i
Oct. 28, 2015
Comments: