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)}"); }
public void GenerateRowsIsCorrect(string initialRow, string expected) { var sut = new AdventOfCode2016.Day18.Day18(initialRow); var actual = sut.GenerateRows(2).Skip(1).First(); Assert.Equal(expected, actual); }
public void CountSafeTilesIsCorrect() { var sut = new AdventOfCode2016.Day18.Day18(".^^.^.^^^^"); var expected = 38; var actual = sut.CountSafeTiles(10); Assert.Equal(expected, actual); }