Skip to content

Commit 74ca35c

Browse files
committed
refactor n move
1 parent b0c7de0 commit 74ca35c

File tree

10 files changed

+9
-4
lines changed

10 files changed

+9
-4
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Input files (for Advent of Code)
2-
input*
2+
input
33

44
# Byte-compiled / optimized / DLL files
55
__pycache__/

.idea/Advent-of-Code.iml

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

day_01.py 2024/Days/01.py

File renamed without changes.

day_02.py 2024/Days/02.py

File renamed without changes.

day_03.py 2024/Days/03.py

File renamed without changes.

day_04.py 2024/Days/04.py

File renamed without changes.

day_05.py 2024/Days/05.py

File renamed without changes.

day_07.py 2024/Days/07.py

File renamed without changes.

day_14.py 2024/Days/14.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from tqdm import tqdm
1414

15-
from utils import Grid, Point
15+
from .utils import Grid, Point
1616

1717

1818
DEMO_INPUT = """
@@ -163,7 +163,10 @@ def part_2(width=101, height=103,
163163
_width = 11
164164
_height = 7
165165
else:
166-
INPUT = open(Path(__file__).parent / input_file).read()
166+
try:
167+
INPUT = open(input_file).read()
168+
except FileNotFoundError:
169+
INPUT = open(Path(__file__).parent.parent / 'Inputs' / '14').read()
167170
_width = 101
168171
_height = 103
169172

utils.py 2024/Days/utils.py

File renamed without changes.

0 commit comments

Comments
 (0)