Skip to content

Commit

Permalink
fix: display the tree upright!
Browse files Browse the repository at this point in the history
  • Loading branch information
GriceTurrble committed Dec 14, 2024
1 parent 5587e14 commit 9c5b70a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 2024/python/src/grice_py_aoc_2024/day14/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def simulate(self, seconds: int, grid_size: IntPair) -> IntPair:


def display_grid(positions: list[IntPair], grid_size: IntPair) -> None:
grid = [["_"] * grid_size[1] for _ in range(grid_size[0])]
grid = [["_"] * grid_size[0] for _ in range(grid_size[1])]
for posx, posy in positions:
try:
grid[posx][posy] = "█"
grid[posy][posx] = "█"
except IndexError:
print(f"{posx=}, {posy=}")
raise
Expand Down

0 comments on commit 9c5b70a

Please sign in to comment.