Skip to content

Commit

Permalink
[2024/12] add a comment in sides()
Browse files Browse the repository at this point in the history
  • Loading branch information
StarlitGhost authored Dec 13, 2024
1 parent c395ecd commit 5c86edc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions 2024/12/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def sides(region: set[tuple]) -> int:
fences = defaultdict(list)
for pos in region:
for n, d in Dir.map_nswe(neighbours(pos)).items():
# no same-region neighbour in this direction, we found a fence
if n not in region:
fences[d].append(pos)

Expand Down

0 comments on commit 5c86edc

Please sign in to comment.