public void SolveWithTestInput()
        {
            var testInput = @".#.
..#
###".Split("\r\n");
            var cube      = new ConwayCube(testInput);

            for (var n = 0; n < 6; n++)
            {
                cube = cube.Mutate(3);
            }
            var part1 = cube.ActiveCells;

            Assert.AreEqual(112, part1);
        }
Пример #2
0
        public (string, string) Solve(string[] input)
        {
            var cube = new ConwayCube(input);

            for (var n = 0; n < 6; n++)
            {
                cube = cube.Mutate(3);
            }
            var part1 = cube.ActiveCells;

            cube = new ConwayCube(input);
            for (var n = 0; n < 6; n++)
            {
                cube = cube.Mutate(4);
            }
            var part2 = cube.ActiveCells;

            return(part1.ToString(), part2.ToString());
        }