Narengowda / TechDummies

Source code for youtube videos
12 stars 11 forks source link

floodfill.py - typo in neighbours function #4

Open Silwest opened 4 years ago

Silwest commented 4 years ago

Instead of: def neighbours(r, c): """Calculates the neighbours of a given cell""" return [[r+1, c], [r+1, c], [r-1, c], [r, c-1], [r+1, c+1], [r+1, c-1], [r-1, c-1], [r-1, c+1]]

It should be: def neighbours(r, c): """Calculates the neighbours of a given cell""" return [[r+1, c], [r, c+1], [r-1, c], [r, c-1], [r+1, c+1], [r+1, c-1], [r-1, c-1], [r-1, c+1]]