diff --git a/squirrelbattle/interfaces.py b/squirrelbattle/interfaces.py index 50ebb2e..9d13046 100644 --- a/squirrelbattle/interfaces.py +++ b/squirrelbattle/interfaces.py @@ -182,6 +182,10 @@ class Map: self.add_entity(dictclasses[entisave["type"]](**entisave)) def large_neighbourhood(self, y, x): + """ + Returns up to 8 nearby coordinates, in a 3x3 square around the input coordinate. + Does not return coordinates if they are out of bounds. + """ neighbours = [] for dy, dx in product([-1, 0, 1], [-1, 0, 1]): if 0 < y+dy < self.height and 0 < x+dx < self.width: