Beispiel #1
0
        public void Part1_Exemple2()
        {
            var input  = "R75,D30,R83,U83,L12,D49,R71,U7,L72\nU62,R66,U55,R34,D71,R55,D58,R83";
            var output = Day3Main.Part1(input);

            Assert.AreEqual(159, output);
        }
Beispiel #2
0
        public void Part1_Exemple3()
        {
            var input  = "R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51\nU98,R91,D20,R16,D67,R40,U7,R15,U6,R7";
            var output = Day3Main.Part1(input);

            Assert.AreEqual(135, output);
        }
Beispiel #3
0
        public void Part1_Exemple1()
        {
            var input  = "R8,U5,L5,D3\nU7,R6,D4,L4";
            var output = Day3Main.Part1(input);

            Assert.AreEqual(6, output);
        }
Beispiel #4
0
    private void CreateTaskForDay(int currentDay)
    {
        var input = AOCInput.GetInput(currentDay);

        if (currentDay == 1)
        {
            CreateTask(() => Day1Main.Part1(input), () => Day1Main.Part2(input));
            Day1Main.StartPart1ComputeShader(input);
        }
        else if (currentDay == 2)
        {
            CreateTask(() => Day2Main.Part1(input), () => Day2Main.Part2(input));
        }
        else if (currentDay == 3)
        {
            CreateTask(() => Day3Main.Part1(input) + "", () => Day3Main.Part2(input) + "");
        }
        else if (currentDay == 4)
        {
            CreateTask(() => Day4Main.Part1(input) + "", () => Day4Main.Part2(input) + "");
        }
        else if (currentDay == 5)
        {
            CreateTask(() => Day5Main.Part1(input) + "", () => Day5Main.Part2(input) + "");
        }
        else if (currentDay == 6)
        {
            CreateTask(() => Day6Main.Part1(input) + "", () => Day6Main.Part2(input) + "");
        }
        else if (currentDay == 7)
        {
            CreateTask(() => Day7Main.Part1(input) + "", () => Day7Main.Part2(input) + "");
        }
        else if (currentDay == 8)
        {
            CreateTask(() => Day8Main.Part1(input) + "", () => Day8Main.Part2(input) + "");
        }
        else if (currentDay == 9)
        {
            CreateTask(() => Day9Main.Part1(input) + "", () => Day9Main.Part2(input) + "");
        }
        else if (currentDay == 10)
        {
            CreateTask(() => Day10Main.Part1(input) + "", () => Day10Main.Part2(input) + "");
        }
        else if (currentDay == 11)
        {
            CreateTask(() => Day11Main.Part1(input) + "", () => Day11Main.Part2(input) + "");
        }
        else if (currentDay == 12)
        {
            CreateTask(() => Day12Main.Part1(input) + "", () => Day12Main.Part2(input) + "");
        }
        else if (currentDay == 13)
        {
            CreateTask(() => Day13Main.Part1(input) + "", () => Day13Main.Part2(input) + "");
        }
        else if (currentDay == 14)
        {
            CreateTask(() => Day14Main.Part1(input) + "", () => Day14Main.Part2(input) + "");
        }
        else if (currentDay == 15)
        {
            CreateTask(() => Day15Main.Part1(input) + "", () => Day15Main.Part2(input) + "");
        }
    }