This repository facilitates that people can work on the puzzles from the public available https://adventofcode.com.
This repository and the code within has no direct integration to Advent of Code, but has a framework solution to easy place a dataset and get it pushed into your solution code. Also UnitTests are available to ease process around the puzzles solving, so you can focus on the most fun part - to solve the challenges.
I cannot take any credit for being part of Advent Of Code, it is the good work of Eric Wastl and his team.
Prerequisites:
- C# knowledge, the solution is based on that
- Visual Studio 2022 version 17.8.0 (Community edition is good enough)
- .NET 8
- Go to https://adventofcode.com
- Login with Google account, Twitter or GitHub
- Go to the year you like to work puzzles for - usually current year :-)
- Read the first puzzle for Day 1, and use any code language to figure the output string
- Submit your answer - and Part 2 puzzle will open.
- Every day in December a new puzzle will open - Go GAME!
Clone the repo, and create a branch to your own code
> Git clone https://github.com/FMMadsen/AdventsOfCode
> Git branch MyName
> Git checkout MyName
Use the UnitTest projects to develop your solution based on the test examples that are given every day. Use the Puzzle Runner console application to see the result of the big datasets. Use predefined dataset files to paste dataset into.
- Open solution in Visual Studio
- Add test dataset into the Unit Test project under "TestDataSets" folder
- Go to the Solutions project and start solve a day puzzle
- Run Unit Tests to see if your solution works
- When it works, get the full dataset from the website
- Paste the full dataset into the Solutions folders 'DataSet' folder ex.: AdventOfCode2023Solutions/DataSets
- Do not paste the full dataset into the Unit Test datasets - they are only for the small tests
- Now run the Console Application "Puzzle Runner" which will output into console, your answer. Paste answer into the website solution