コード例 #1
0
        public void Return29Cubes_AfterExecuting1Cycle()
        {
            const string initialState = @".#.
..#
###";

            var sut = new PocketFourDimension(initialState);

            sut.DoCycle();
            Assert.Equal(29, sut.ActiveCubes);
        }
コード例 #2
0
        public void SolveSecondPuzzle()
        {
            const string initialState = @".#######
#######.
###.###.
#....###
.#..##..
#.#.###.
###..###
.#.#.##.";

            var sut = new PocketFourDimension(initialState);

            sut.DoCycle();
            sut.DoCycle();
            sut.DoCycle();
            sut.DoCycle();
            sut.DoCycle();

            sut.DoCycle();
            Assert.Equal(2296, sut.ActiveCubes);
        }