Example #1
0
        public void Example_1()
        {
            var initialState = new[]
            {
                ".#.",
                "..#",
                "###"
            };

            var simulation = new Conway4dCubesSimulation(initialState);

            simulation.Simulate();
            simulation.Simulate();
            simulation.Simulate();
            simulation.Simulate();
            simulation.Simulate();
            simulation.Simulate();

            Assert.Equal(848, simulation.ActiveCubes.Count);
        }
Example #2
0
        public void Puzzle_17B()
        {
            var initialState = new[]
            {
                "..##.#.#",
                ".#####..",
                "#.....##",
                "##.##.#.",
                "..#...#.",
                ".#..##..",
                ".#...#.#",
                "#..##.##"
            };

            var simulation = new Conway4dCubesSimulation(initialState);

            simulation.Simulate();
            simulation.Simulate();
            simulation.Simulate();
            simulation.Simulate();
            simulation.Simulate();
            simulation.Simulate();
            Assert.Equal(1624, simulation.ActiveCubes.Count);
        }