dotnet new console --name "AoC-<YEAR>"
dotnet sln AdventOfCode.sln add AoC-<Year>
mkdir -p AoC-<Year>/00 Problem Title/Data
touch AoC-<YEAR>/00 Problem Title/InputParser.cs
touch AoC-<YEAR>/00 Problem Title/Part1.cs
touch AoC-<YEAR>/00 Problem Title/Part2.cs
touch AoC-<YEAR>/00 Problem Title/00 Test.cs
echo "namespace AoC_[YEAR].Day_[DAY];" > AoC-<YEAR>/00 Problem Title/*.cs
- Navigate to https://adventofcode.com/[year]/day/[day]
# alternatively curl out the page yourself
curl -sL https://adventofcode.com/<year>/day/<day>
- Navigate to https://adventofcode.com/[year]/day/[day]/input
- Paste or download the output to the following paths
AoC-/00 Problem Title/Data/ExampleInput.in
AoC-/00 Problem Title/Data/PuzzleInput.in
- The
00 Test.cs
file inside each day must contain the following boilerplate
// 00 Test.cs
public class AoC_[YEAR]_Day_[DAY] {
public static void Test() {
/* ... */
}
}
- In
AoC_<YEAR>/Program.cs
call theTest()
method of each problem you're testing:
// AoC_<YEAR>/Program.cs
using AoC_[YEAR].Day_[DAY];
public static void Main() {
AoC_[YEAR]_Day_01.Test();
AoC_[YEAR]_Day_02.Test();
AoC_[YEAR]_Day_03.Test();
/* ... */
}