We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
_gears_positions
1 parent 7dfbd77 commit 94cdc82Copy full SHA for 94cdc82
puzzles/solutions/2023/d03/schematic_parser.py
@@ -77,3 +77,10 @@ def find_part_numbers(self) -> list[int]:
77
is_adjacent_to_symbol = False
78
79
return [number for number, digits_positions in self._numbers]
80
+
81
+ def find_gears(self):
82
+ for row, column in itertools.product(
83
+ range(self._schematic_length), range(self._schematic_width)
84
+ ):
85
+ if self._schematic[row][column] == "*":
86
+ self._gears_positions.append((row, column))
0 commit comments