Skip to content

Commit 58cb5a1

Browse files
committed
replace x and y attributes with one tuple attribute
1 parent 47fdf02 commit 58cb5a1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/floors/floor.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,13 @@ def is_dead_end(self, x: int, y: int) -> bool:
228228
"""
229229
return self.count_neighbours(x, y) == 1
230230

231-
def has_no_neighbours(self, x: int, y: int) -> bool:
231+
def has_no_neighbours(self, coordinates: Tuple[int, int]) -> bool:
232232
"""
233233
Checks if they are zero neighbours at the given location.
234-
@param x: x pos
235-
@param y: y pos
234+
@param coordinates: coordinates to check
236235
@return: True if the location has zero neighbours otherwise False
237236
"""
238-
return self.count_neighbours(x, y) == 0
237+
return self.count_neighbours(coordinates[0], coordinates[1]) == 0
239238

240239
def is_within_border(self, coordinates: Tuple[int, int]) -> bool:
241240
"""

0 commit comments

Comments
 (0)