Beispiel #1
0
        static void Main(string[] args)
        {
            while (true)
            {
                Console.WriteLine("*******************");
                Console.WriteLine("Advent of Code 2019");
                Console.WriteLine("*******************");
                Console.WriteLine();
                Console.Write("Run day: ");
                int dayToRun = int.Parse(Console.ReadLine());

                switch (dayToRun)
                {
                case 1:
                    Day01.Run();
                    break;

                case 2:
                    Day02.Run();
                    break;

                case 3:
                    Day03.Run();
                    break;

                case 4:
                    Day04.Run();
                    break;

                case 5:
                    Day05.Run();
                    break;

                case 6:
                    Day06.Run();
                    break;

                case 7:
                    Day07.Run();
                    break;

                case 8:
                    Day08.Run();
                    break;

                case 9:
                    Day09.Run();
                    break;

                case 10:
                    Day10.Run();
                    break;

                case 11:
                    Day11.Run();
                    break;

                case 12:
                    Day12.Run();
                    break;

                case 13:
                    Day13.Run();
                    break;

                case 14:
                    Day14.Run();
                    break;

                case 15:
                    Day15.Run();
                    break;

                case 16:
                    Day16.Run();
                    break;

                case 17:
                    Day17.Run();
                    break;

                case 18:
                    Day18.Run();
                    break;

                case 19:
                    Day19.Run();
                    break;

                case 20:
                    Day20.Run();
                    break;

                case 21:
                    Day21.Run();
                    break;

                case 22:
                    Day22.Run();
                    break;

                case 23:
                    Day23.Run();
                    break;

                case 24:
                    Day24.Run();
                    break;

                case 25:
                    Day25.Run();
                    break;
                }
                Console.WriteLine();
            }
        }
Beispiel #2
0
 static void Main(string[] args)
 {
     Console.WriteLine("---Welcome to erjicle's solutions to Advent of Code 2019!!---");
     // Day 1
     Console.WriteLine($"Day 1 - Part 1: {Day01.GetDay1Part1Answer()}");
     Console.WriteLine($"Day 1 - Part 2: {Day01.GetDay1Part2Answer()}");
     // Day 2
     Console.WriteLine($"Day 2 - Part 1: {Day02.GetDay2Part1Answer()}");
     Console.WriteLine($"Day 2 - Part 2: {Day02.GetDay2Part2Answer()}");
     // Day 3.
     Console.WriteLine($"Day 3 - Part 1: {Day03.GetDay3Part1Answer()}");
     Console.WriteLine($"Day 3 - Part 2: {Day03.GetDay3Part2Answer()}");
     // Day 4
     Console.WriteLine($"Day 4 - Part 1: {Day04.GetDay4Part1Answer()}");
     Console.WriteLine($"Day 4 - Part 2: {Day04.GetDay4Part2Answer()}");
     // Day 5
     Console.WriteLine("Day 5 - Part 1:");
     Day05.RunDay5Part1();
     Console.WriteLine("Day 5 - Part 2:");
     Day05.RunDay5Part2();
     // Day 6
     Console.WriteLine($"Day 6 - Part 1: {Day06.GetDay6Part1Answer()}");
     Console.WriteLine($"Day 6 - Part 2: {Day06.GetDay6Part2Answer()}");
     // Day 7
     Console.WriteLine($"Day 7 - Part 1: {Day07.GetDay7Part1Answer()}");
     Console.WriteLine($"Day 7 - Part 2: {Day07.GetDay7Part2Answer()}");
     // Day 8
     Console.WriteLine($"Day 8 - Part 1: {Day08.GetDay8Part1Answer()}");
     Console.WriteLine($"Day 8 - Part 2:");
     Day08.RunDay8Part2();
     // Day 9
     Console.WriteLine($"Day 9 - Part 1: {Day09.GetDay9Part1Answer()}");
     Console.WriteLine($"Day 9 - Part 2: {Day09.GetDay9Part2Answer()}");
     // Day 10
     Console.WriteLine($"Day 10 - Part 1: {Day10.GetDay10Part1Answer()}");
     Console.WriteLine($"Day 10 - Part 2: {Day10.GetDay10Part2Answer()}");
     // Day 11
     Console.WriteLine($"Day 11 - Part 1: {Day11.GetDay11Part1Answer()}");
     Console.WriteLine($"Day 11 - Part 2: {Day11.RunDay11Part2()}");
     // Day 12
     Console.WriteLine($"Day 12 - Part 1: {Day12.GetDay12Part1Answer()}");
     Console.WriteLine($"Day 12 - Part 2: {Day12.GetDay12Part2Answer()}");
     // Day 13
     Console.WriteLine($"Day 13 - Part 1: {Day13.GetDay13Part1Answer()}");
     Console.WriteLine($"Day 13 - Part 2: {Day13.GetDay13Part2Answer()}");
     // Day 14
     Console.WriteLine($"Day 14 - Part 1: {Day14.GetDay14Part1Answer()}");
     Console.WriteLine($"Day 14 - Part 2: {Day14.GetDay14Part2Answer()}");
     // Day 15
     Console.WriteLine($"Day 15 - Part 1: {Day15.GetDay15Part1Answer()}");
     Console.WriteLine($"Day 15 - Part 2: {Day15.GetDay15Part2Answer()}");
     // Day 16
     Console.WriteLine($"Day 16 - Part 1: {Day16.GetDay16Part1Answer()}");
     Console.WriteLine($"Day 16 - Part 2: {Day16.GetDay16Part2Answer()}");
     // Day 17
     Console.WriteLine($"Day 17 - Part 1: {Day17.GetDay17Part1Answer()}");
     Console.WriteLine($"Day 17 - Part 2: {Day17.GetDay17Part2Answer()}");
     // Day 18
     Console.WriteLine($"Day 18 - Part 1: {Day18.GetDay18Part1Answer()}");
     Console.WriteLine($"Day 18 - Part 2: {Day18.GetDay18Part2Answer()}");
     // Day 19
     Console.WriteLine($"Day 19 - Part 1: {Day19.GetDay19Part1Answer()}");
     Console.WriteLine($"Day 19 - Part 2: {Day19.GetDay19Part2Answer()}");
     // Day 20
     Console.WriteLine($"Day 20 - Part 1: {Day20.GetDay20Part1Answer()}");
     Console.WriteLine($"Day 20 - Part 2: {Day20.GetDay20Part2Answer()}");
     // Day 21
     Console.WriteLine($"Day 21 - Part 1: {Day21.GetDay21Part1Answer()}");
     Console.WriteLine($"Day 21 - Part 2: {Day21.GetDay21Part2Answer()}");
     // Day 22
     Console.WriteLine($"Day 22 - Part 1: {Day22.GetDay22Part1Answer()}");
     Console.WriteLine($"Day 22 - Part 2: {Day22.GetDay22Part2Answer()}");
     // Day 23
     Console.WriteLine($"Day 23 - Part 1: {Day23.GetDay23Part1Answer()}");
     Console.WriteLine($"Day 23 - Part 2: {Day23.GetDay23Part2Answer()}");
     // Day 24
     Console.WriteLine($"Day 24 - Part 1: {Day24.GetDay24Part1Answer()}");
     Console.WriteLine($"Day 24 - Part 2 Test: {Day24.GetDay24Part2AnswerTest()}");
     Console.WriteLine($"Day 24 - Part 2: {Day24.GetDay24Part2Answer()}");
     // Day 24
     Console.WriteLine($"Day 25 - Part 1: {Day25.GetDay25Part1Answer()}");
 }
Beispiel #3
0
        static private bool LoadPuzzles(string option)
        {
            bool finish = false;

            switch (option)
            {
            case "1":
                Day1 day1 = new Day1();
                day1.Execute();
                break;

            case "2":
                Day2 day2 = new Day2();
                day2.Execute();
                break;

            case "3":
                Day3 day3 = new Day3();
                day3.Execute();
                break;

            case "4":
                Day4 day4 = new Day4();
                day4.Execute();
                break;

            case "5":
                Day5 day5 = new Day5();
                day5.Execute();
                break;

            case "6":
                Day6 day6 = new Day6();
                day6.Execute();
                break;

            case "7":
                Day7 day7 = new Day7();
                day7.Execute();
                break;

            case "8":
                Day8 day8 = new Day8();
                day8.Execute();
                break;

            case "9":
                Day9 day9 = new Day9();
                day9.Execute();
                break;

            case "10":
                Day10 day10 = new Day10();
                day10.Execute();
                break;

            case "11":
                Day11 day11 = new Day11();
                day11.Execute();
                break;

            case "12":
                Day12 day12 = new Day12();
                day12.Execute();
                break;

            case "13":
                Day13 day13 = new Day13();
                day13.Execute();
                break;

            case "14":
                Day14 day14 = new Day14();
                day14.Execute();
                break;

            case "q":
            case "Q":
                finish = true;
                break;
            }
            return(finish);
        }