Example #1
0
        private static void Day18()
        {
            var lines = File.ReadAllLines(@"..\..\Day18\input.txt");
            var d18   = new Day18.Day18(lines[0]);

            Console.WriteLine($"Safe tiles 40 rows = {d18.CountSafeTiles(40)}");
            Console.WriteLine($"Safe tiles 400000 rows = {d18.CountSafeTiles(400000)}");
        }
Example #2
0
        public void CountSafeTilesIsCorrect()
        {
            var sut      = new AdventOfCode2016.Day18.Day18(".^^.^.^^^^");
            var expected = 38;

            var actual = sut.CountSafeTiles(10);

            Assert.Equal(expected, actual);
        }