public void InitAlive(int x, int y) { Cell cell = _board.AddCell(x, y); _alives.Add(cell); cell.Update(true); cell.PostUpdate(); }
public void IsAliveShouldBeTrueAfterDeadCellUpdateGivenRegenerationNeighbors() { Cell cell = DeadCell(); new PopulationControl().UpdateState(cell, RegenerationNeighbors); cell.Update(); Assert.True(cell.IsAlive()); }
public void IsAliveShouldBeFalseAfterAliveCellUpdateGivenOverpopulationNeighbors() { Cell cell = AliveCell(); new PopulationControl().UpdateState(cell, OverpopulationNeighbors); cell.Update(); Assert.False(cell.IsAlive()); }
public void IsAliveShouldBeTrueAfterAliveCellUpdateGivenMinStaticNeighbors() { Cell cell = AliveCell(); new PopulationControl().UpdateState(cell, MinStaticNeighbors); cell.Update(); Assert.True(cell.IsAlive()); }