C# solutions to the Advent Of Code 2024 Puzzles.
- Unit Tests are provided to verify the answers for Part 1 and Part 2 of the puzzles. These Tests are run automatically when code is pushed to the
mainbranch using GitHub Actions.
- The convenience script
Get-AdventOfCodeInput.ps1can be used to download puzzle inputs, using the Advent of Code API. - Because the script is not digitally signed, you must bypass Windows security policy using
Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassAn example to get the input files for Year 2024 and Day 1 is:
.\Get-AdventOfCodeInput.ps1 -Password <password> -Cookie <cookie> -Year 2024 -Day 1- The cookie required by this script can be obtained as follows
- The password is contained in my Password manager, but should also be set as a GitHub Action secret named
ARCHIVEPASSWORD
To measure the run duration and memory usage, set the Start up project to be AdventOfCode.Benchmark, rebuild the projects in Release mode, and run the Benchmark project. This will output timing and memory usage using BenchmarkDotnet.
The structure of this solution was based on this example