Example #1
0
        public void GetNextState_LiveCell_2LiveNeighbours_StaysAlive()
        {
            var cell = CellTestHelper.MakeLiveCell();

            List <State> twoNeighbours = CellTestHelper.CreateConwayNeighboursList(2);

            CellTestHelper.EvolveCell(cell, twoNeighbours);

            Assert.IsTrue(cell.CurrentState == State.ALIVE);
        }
Example #2
0
        public void GetNextState_LiveCell_1LiveNeighbours_Dies()
        {
            var cell = CellTestHelper.MakeLiveCell();

            List <State> oneNeighbour = CellTestHelper.CreateConwayNeighboursList(1);

            CellTestHelper.EvolveCell(cell, oneNeighbour);

            Assert.IsTrue(cell.CurrentState == State.DEAD);
        }