From 9c5b70ae74dd0e24f4200766367cee7911150a11 Mon Sep 17 00:00:00 2001 From: Galen Rice Date: Sat, 14 Dec 2024 03:49:44 -0500 Subject: [PATCH] fix: display the tree upright! --- 2024/python/src/grice_py_aoc_2024/day14/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2024/python/src/grice_py_aoc_2024/day14/main.py b/2024/python/src/grice_py_aoc_2024/day14/main.py index 140416f..d7b1ae5 100644 --- a/2024/python/src/grice_py_aoc_2024/day14/main.py +++ b/2024/python/src/grice_py_aoc_2024/day14/main.py @@ -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