Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution in Clear category for Moore Neighbourhood by savao
# migrated from python 2.7
def count_neighbours(g, r, c):
br = r-1 if r > 0 else 0
bc = c-1 if c > 0 else 0
er = r+1 if r
Dec. 29, 2014
Comments: