Exemple #1
0
        public void GetNextState_DeadCell_9LiveNeighbours_BecomesAlive()
        {
            var          cell           = CellTestHelper.MakeDeadViralCell();
            List <State> nineNeighbours = CellTestHelper.CreateConwayNeighboursList(9);

            CellTestHelper.EvolveCell(cell, nineNeighbours);
            Assert.IsTrue(cell.CurrentState == State.ALIVE);
        }
Exemple #2
0
        public void GetNextState_DeadCell_6LiveNeighbours_StaysDead()
        {
            var          cell          = CellTestHelper.MakeDeadViralCell();
            List <State> sixNeighbours = CellTestHelper.CreateConwayNeighboursList(6);

            CellTestHelper.EvolveCell(cell, sixNeighbours);
            Assert.IsTrue(cell.CurrentState == State.DEAD);
        }