Skip to content

Commit e7f0317

Browse files
committed
chore: role -> roll rename
1 parent d7e21da commit e7f0317

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

_2025/solutions/day04.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Solution(SolutionBase):
4040
(1, 1), # down-right
4141
]
4242

43-
def find_accessible_roles(
43+
def find_accessible_rolls(
4444
self, grid: list[list[str]], rows: int, cols: int
4545
) -> list[tuple[int, int]]:
4646
"""Find all accessible paper rolls in the current grid.
@@ -89,7 +89,7 @@ def part1(self, data: list[str]) -> int:
8989
"""
9090
grid = [list(row) for row in data]
9191
rows, cols = len(grid), len(grid[0])
92-
return len(self.find_accessible_roles(grid, rows, cols))
92+
return len(self.find_accessible_rolls(grid, rows, cols))
9393

9494
def part2(self, data: list[str]) -> int:
9595
"""Count the total number of rolls that can be removed.
@@ -108,14 +108,14 @@ def part2(self, data: list[str]) -> int:
108108
"""
109109
grid = [list(row) for row in data]
110110
rows, cols = len(grid), len(grid[0])
111-
positions = self.find_accessible_roles(grid, rows, cols)
111+
positions = self.find_accessible_rolls(grid, rows, cols)
112112

113113
count = 0
114114
while (c := len(positions)) > 0:
115115
count += c
116116
for y, x in positions:
117117
grid[y][x] = "."
118118

119-
positions = self.find_accessible_roles(grid, rows, cols)
119+
positions = self.find_accessible_rolls(grid, rows, cols)
120120

121121
return count

0 commit comments

Comments
 (0)