public static void DownloadMissingDays() { for (var i = 1; i < AdventOfCode.DaysReleased(); i++) { if (!File.Exists(GetLocalInputFilePath(i))) { DownloadDayInput(i); } } }
private static void Main(string[] args) { Environment.ExitCode = 1; var aoc = AdventOfCode.Build(config => config .ConfigureServices(ConfigureServices) .LoadCallingAssembly() .AddConsole() .AddClient()); // adding console will force aggregate results of puzzles, otherwise iterate through the return value of runner.Run() aoc.Run(); // foreach (var puzzleData in aoc.Run()) // foreach (var result in puzzleData.Results) // { // } }
public void IntCodeComputerTest() { int[] opCodeSeq; int[] resOpCodeSeq; //first read the input data and create the op sequence. using (StreamReader sr = new StreamReader(Directory.GetCurrentDirectory() + @"\Resources\Day2Test.txt")) { while (!sr.EndOfStream) { opCodeSeq = AdventOfCode.LineToArray(sr); resOpCodeSeq = AdventOfCode.LineToArray(sr); var output = AdventOfCode.IntCodeComputer(opCodeSeq); for (int idx = 0; idx < opCodeSeq.Length; idx++) { Assert.AreEqual(resOpCodeSeq[idx], output[idx]); } } } }