diff options
-rw-r--r-- | utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -52,7 +52,7 @@ def adjacent(p: Point2D[int], diagonal: bool = True) -> Iterator[Point2D[int]]: for dx in range(-1, 2): for dy in range(-1, 2): if dx == 0 and dy == 0: continue - if dx != 0 and dy != 0 and not adjacent: continue + if dx != 0 and dy != 0 and not diagonal: continue yield Point2D(p.x + dx, p.y + dy) def adjacent_bounded(p: Point2D[int], bound: Point2D[int], diagonal: bool = True) \ |