1
0
Fork 0
Find a file
2022-12-18 11:49:02 +01:00
input Solve day 18 2022-12-18 11:49:02 +01:00
src Solve day 18 2022-12-18 11:49:02 +01:00
.gitignore Add convenient project base 2022-11-19 21:11:26 +01:00
Cargo.lock Solve day 15 2022-12-15 23:42:37 +01:00
Cargo.toml Solve day 15 2022-12-15 23:42:37 +01:00
justfile Add convenient project base 2022-11-19 21:11:26 +01:00
README.md Add convenient project base 2022-11-19 21:11:26 +01:00

Advent Of Code 2022

My solutions for Advent Of Code 2022.

Usage

This project uses just to speed up some commands. For some commands to work (like downloading puzzle input or submitting a solution) a session token needs to be provided in the AOC_SESSION environment variable. The easiest way to set it is to create the file .env with AOC_SESSION=your token inside in the root of this repository. The token can be received by reading the session cookie from the AOC website.

Download the puzzle input, create a file for the current day and open it in vscode:

just begin        # Prepare the current day
just day=09 begin # Prepare day 9

Run:

just        # Runs the current day
just day=09 # Runs day 9

After running a puzzle the output is saved to output/XX.log. This log will be read when submitting puzzles:

just submit 1        # Submit the first half of a puzzle
just submit 2        # Submit the second half of a puzzle
just day=09 submit 2 # Submit the second half of the puzzle for day 9

Submit looks for a line containing level-1-solution=123 to submit 123 as the solution to level 1. There is a convenience function solved_level_1 in lib.rs you can use to avoid printing this line manually.