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

            var sut = new PocketThreeDimension(initialState);

            Assert.Equal(5, sut.ActiveCubes);
        }
Exemplo n.º 2
0
        public void Return11Cubes_AfterExecuting1Cycle()
        {
            const string initialState = @".#.
..#
###";

            var sut = new PocketThreeDimension(initialState);

            sut.DoCycle();
            Assert.Equal(11, sut.ActiveCubes);
        }
Exemplo n.º 3
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);
        }