static void Main(string[] args) { //Day1 d1 = new Day1(ReadFileInput()); //d1.Initialise(ReadFileInput()); //d1.CalculateFreq_Part2(); //Day2 d2 = new Day2(ReadFileInput()); //d2.Initialise(ReadFileInput()); //d2.GetChecksum(); //Day3 d3 = new Day3(ReadFileInput()); //d3.Initialise(ReadFileInput()); //d3.CompletePart_1(); //Day4 d4 = new Day4(ReadFileInput()); //d4.Initialise(ReadFileInput()); //d4.CompletePartOne(); //Day5 d5 = new Day5(ReadFileInput()); //d5.Initialise(ReadFileInput()); //d5.Run(); Day6 d6 = new Day6(); d6.Initialise(ReadFileInput()); d6.Run(); Console.ReadLine(); }
static void Main(string[] args) { List <Action> days = new List <Action> { () => Day1(), () => Day2(), () => Day3(), () => Day4(), () => Day5(), () => Day6.Run(), () => Day7.Run(), () => Day8(), () => Day9.Run(), () => Day10(), () => Day11.Run(), () => Day12.Run(), () => Day13.Run(), () => Day14.Run(), () => Day15.Run(), () => Day16(), () => Day17.Run(), () => Day18.Run(), () => Day19.Run(), () => Day20(), () => Day21.Run(), () => Day22.Run(), () => Day23.Run(), () => Day24.Run(), () => Day25.Run() }; for (int i = 0; i < days.Count; i++) { Console.WriteLine("Day " + (i + 1) + ":"); days[i].Invoke(); Console.WriteLine(); } Console.WriteLine("Färdig!"); Console.ReadKey(); }
static void Main(string[] args) { bool repeat = true; Console.WriteLine("ADVENT OF CODE 2016"); Console.WriteLine("#######GODJUL#######"); while (repeat) { Console.Write("Select day(1-25, 0 to exit): "); string day = Console.ReadLine(); Console.WriteLine(); switch (day) { case "1": Day1 day1 = new Day1(); day1.Run(); break; case "2": Day2 day2 = new Day2(); day2.Run(); break; case "3": Day3 day3 = new Day3(); day3.Run(); break; case "4": Day4 day4 = new Day4(); day4.Run(); break; case "5": Day5 day5 = new Day5(); day5.Run(); break; case "6": Day6 day6 = new Day6(); day6.Run(); break; case "7": Day7 day7 = new Day7(); day7.Run(); break; case "0": repeat = false; break; default: break; } Console.WriteLine(); } Console.WriteLine("hej då"); Console.ReadKey(); }