コード例 #1
0
ファイル: Day20.cs プロジェクト: terjew/AdventOfCode2020
        static void Main(string[] args)
        {
            Tile.Test();
            long part1 = 0;

            Tile[] tiledPicture = null;
            int    dim          = 0;

            Performance.TimeRun("Part1", () => (part1, tiledPicture, dim) = Part1("input.txt"), 5, 10, 5);
            Console.WriteLine($"Part 1: {part1}");

            int             part2 = 0;
            Matrix2D <char> chart = null;

            Performance.TimeRun("Part2", () => (part2, chart) = Part2(tiledPicture, dim), 2, 1000, 5);

            Console.WriteLine($"Part 2: {part2}");
            var colormap = CharMatrix.DefaultColorMap();

            colormap['*'] = ConsoleColor.White;
            colormap['.'] = ConsoleColor.DarkBlue;
            colormap['#'] = ConsoleColor.Blue;
            colormap['O'] = ConsoleColor.Green;
            chart.DumpColor(colormap);
        }