Пример #1
0
        public void GivenAUniverseWithADeadCellWithThreeLiveNeighbours_WhenEvolved_TheCellComesAlive()
        {
            var deadCell = new FakeCellLocation();
            var liveCell1 = new FakeCellLocation(deadCell);
            var liveCell2 = new FakeCellLocation(deadCell);
            var liveCell3 = new FakeCellLocation(deadCell);
            deadCell.SetFakeNeighbours(new[] { liveCell1, liveCell2, liveCell3 });
            var initialUniverse = new Universe(new[] { liveCell1, liveCell2, liveCell3 });

            var evolvedUniverse = EvolveUniverse(initialUniverse);

            Assert.That(evolvedUniverse.LiveCellLocations, Has.Member(deadCell));
        }