Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Stegallo committed Dec 8, 2024
1 parent 94be1c8 commit a37abd7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions y_2024/day6.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _preprocess_input(self):
break

def _calculate_1(self) -> int:
grid = {k: v for k, v in self.grid.items()}
grid = dict(self.grid.items())
position = self.starting_point
direction = DIRS[grid[self.starting_point]]
grid[position] = "X"
Expand All @@ -41,15 +41,15 @@ def _calculate_1(self) -> int:
def _calculate_2(self) -> int:
result = 0
for i in self._visited_in_1 - {self.starting_point}:
grid = {k: v for k, v in self.grid.items()}
grid = dict(self.grid.items())
grid[i] = "#"
result += self.run_in_circe(grid)
result += self.run_in_circle(grid)
return result

def run_in_circe(self, grid) -> bool:
grid = {k: v for k, v in grid.items()}
def run_in_circle(self, grid) -> bool:
grid = dict(grid.items())
position = self.starting_point
direction = DIRS[self.grid.grid[self.starting_point]]
direction = DIRS[grid[self.starting_point]]
visited = {}
while True:
visited[(position, direction)] = True
Expand Down

0 comments on commit a37abd7

Please sign in to comment.