Ejemplo n.º 1
0
        public void Return21Cubes_AfterExecuting2Cycles()
        {
            const string initialState = @".#.
..#
###";

            var sut = new PocketThreeDimension(initialState);

            sut.DoCycle();

            sut.DoCycle();
            Assert.Equal(21, sut.ActiveCubes);
        }
Ejemplo n.º 2
0
        public void SolveFirstPuzzle()
        {
            const string initialState = @".#######
#######.
###.###.
#....###
.#..##..
#.#.###.
###..###
.#.#.##.";

            var sut = new PocketThreeDimension(initialState);

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

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