Skip to content

chromex/adventofcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdventOfCode.Template

CI

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:

image

Basic usage

  • Create one class per advent day, following DayXX or Day_XX naming convention and implementing AoCHelper.BaseDay.
  • Place input files under Inputs/ dir, following XX.txt convention.
  • Read the input content from InputFilePath and solve the puzzle by implementing Solve_1() and Solve_2()!

By default, only your last problem will be solved when running the project. You can change that by behavior by modifying Program.cs:

  • Solver.SolveAll(); → solves all the days.

  • Solver.SolveLast(); → solves only the last day.

  • Solver.Solve<Day_XX>(); → solves only day XX.

  • Solver.Solve(XX, YY); → solves only days XX and YY.

  • Solver.Solve(new uint[] { XX, YY }); → same as above.

  • Solver.Solve(typeof(Day_XX), typeof(Day_YY)); → same as above.

  • Solver.Solve(new [] { typeof(Day_XX), typeof(Day_YY) }); → same as above.

Advance usage

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published