public void WhenDead_ShouldBecomeAlive_WhenExactly3NeighboursAreAlive() { var cell = new Cell(); Neighbourhood neighbourhood = NeighbourhoodFactory.MakeNeighbourhood(3); cell.Transition(neighbourhood); Assert.True(cell.IsAlive()); }
public void WhenDead_ShouldRemainDead_WhenAliveNeighboursAreMoreThan3() { var cell = new Cell(); Neighbourhood neighbourhood = NeighbourhoodFactory.MakeNeighbourhood(4); cell.Transition(neighbourhood); Assert.False(cell.IsAlive()); }
public void WhenAlive_ShouldBecomeDead_WhenLessThan2NeighboursAreAlive() { var cell = new Cell(CellState.Alive); Neighbourhood neighbourhood = NeighbourhoodFactory.MakeNeighbourhood(1); cell.Transition(neighbourhood); Assert.False(cell.IsAlive()); }