Advent of Code template based on AoCHelper project.
It allows you to focus on solving AoC puzzles while providing you with some performance stats.
Problem example:
using AoCHelper;
using System.IO;
namespace AdventOfCode
{
public class Day_01 : BaseDay
{
public override string Solve_1() => $"Solution 1";
public override string Solve_2() => $"Solution 2";
}
}
Output example:
- Create one class per advent day, following
DayXX
orDay_XX
naming convention and implementingAoCHelper.BaseDay
. - Place input files under
Inputs/
dir, followingXX.txt
convention. - Read the input content from
InputFilePath
and solve the puzzle by implementingSolve_1()
andSolve_2()
!
By default, all your problems will be solved when running the project. You can change that by behavior by replacing Solver.SolveAll();
in Program.cs
with:
-Solver.SolveLast();
→ solves only the last day.
-Solver.Solve<Day_XX>();
→ solves only day XX
.
-Solver.Solve(typeof(Day_XX), typeof(Day_YY));
→ solves only days XX
and YY
.
-Solver.Solve(new []{ typeof(Day_XX), typeof(Day_YY) });
→ same as above.
Check AoCHelper README file for detailed information about how to override the default file naming and location conventions of your problem classes and input files.