A repository for my solutions to Advent of Code. This project is a C# console application using .NET 8 with the aim to solve all of the puzzles from 2015 to 2023.
Feel free to run through the solutions (Note: Potential Spoilers 🙈 )
⭐ - One Part 🌟 - Both Parts
01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2015 | 🌟 | 🌟 | 🌟 | ||||||||||||||||||||||
2016 | |||||||||||||||||||||||||
2017 | |||||||||||||||||||||||||
2018 | |||||||||||||||||||||||||
2019 | |||||||||||||||||||||||||
2020 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | |||||||
2021 | 🌟 | 🌟 | |||||||||||||||||||||||
2022 | |||||||||||||||||||||||||
2023 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 | 🌟 |
To run the code, ensure you have the .NET 8 SDK or Visual Studio 2022
Then, if running without Visual Studio, from the root directory run dotnet restore
to ensure you have the required NuGet packages installed. Alternatively run open the solution file to install the required packages.
Before starting the app for the first time, you'll want to grab your Advent of Code session cookie.
This will be used to fetch the puzzle input for each day directly from the site rather than needing to add it in yourself.
ℹ️ The app only downloads the input for a given day once and stores it in your Documents directory rather than getting the input from the Advent of Code servers every time.
To do this go to Advent of Code and get your session cookie using the Developer Tools.
Next, grab your Advent of Code session key. In Chrome this can be found under the Application tab in DevTools as seen below:
You'll then need to create a copy of the appsettings.template.json
file (located in the AdventOfCode.Console
project) and name it appsettings.json
.
Once you've copied your file, populate the SessionToken
with the token retrieved.
To run the console app you can run the app in Visual Studio.
You'll then be presented with a Welcome Screen where you will be prompted to input a year and a day (or press Enter at both prompts to run all of the Advent of Code solutions) to see the results.
After running the app for the first time and selecting Run all Solutions
, the puzzle input will be downloaded for each day. Once this has been completed you'll be able to run the Solution tests to verify that the solutions work as expected.
Distributed under the MIT License. See LICENSE for more information.
- rxaiver's GitHub Emoji Cheat Sheet
- Img Shields
- Choose an Open Source License
- othneildrew's Best README Template
Owner: Sam Welek
Project Link: GitHub