This is my try on the Advent of code of 2024 challanges in Python.
- Day 1 - Historian Hysteria: ⭐⭐
- Day 2 - Red-Nosed Reports: ⭐⭐
- Day 3 - Mull It Over: ⭐⭐
- Day 4 - Ceres Search: ⭐⭐
- Day 5 - Print Queue: ⭐⭐
- Day 6 - Guard Gallivant: ⭐⭐
- Day 7 - Bridge Repair: ⭐⭐
- Day 8 - Resonant Collinearity: ⭐⭐
- Day 9 - Disk Fragmenter: ⭐⭐
- Day 10 - Hoof It: ⭐⭐
- Day 11 - Plutonian Pebbles: ⭐⭐
- Day 12 - Garden Groups: ⭐
- Day 13 - Claw Contraption: ⭐⭐
- Day 14 - Restroom Redoubt: ⭐⭐
- Day 15 - Warehouse Woes: ⭐
- Day 16 - Reindeer Maze: ⭐
- Day 17 - Chronospatial Computer: ⭐⭐
- Day 18 - RAM Run: ⭐⭐
- Day 19 - Linen Layout: ⭐⭐
- ...
- Day 22 - Monkey Market: ⭐⭐
- Day 23 - LAN Party: ⭐⭐
- Day 24 - Crossed Wires: ⭐
- Day 25 - Code Chronicle: ⭐
main.py- file: this file provides code to automatically create the needed files for each day and run the code.days- folder: the code for each day will be in the days folder as adayX.pyfile.inputs- folder: all my input data for each day is saved the inputs folder as adayX.txtfile. I also have atest.txtfile, that I use for the example input of each days puzzle.helpers- folder: contains myhelpers.pyandtemplate.pyfiles. The helper files has some functions to read the input data an I am pretty sure, I will add some other helping functions if I see that puzzles will need some generic functionality more than once. And the template file is my base for every days puzzle.
To create a new day you can run the following command:
python main.py create <day>
where <day> is the number of the day you want to create.
This will create a new file in the days folder called day<day>.py (with the content of the template.py file is existend) and a new file in the inputs folder called day<day>.txt.
(You can also create the files by hand if you want of course)
There are two ways to run a day:
Simply run the following command:
python main.py run <day> [test]
where <day> is the number of the day you want to run and [test] is an optional parameter to run the day with the test input file otherwise it will automatically use the day's input file.
Example for day1 with day1 input file:
python main.py run 1
Example for day1 with the test input:
python main.py run 1 test
Simply run the wanted days file with python:
python .\days\day<day>.py [test]
where <day> is the number of the day you want to run and [test] is an optional parameter to run the day with the test input file otherwise it will automatically use the day's input file.
Example for day1 with day1 input file:
python .\days\day1.py
Example for day1 with the test input:
python .\days\day1.py test