public void TooLittleOrTooManyNeighbours_ShouldNotReproduce( Cell cell, IEnumerable <Cell> neighbours) { var cells = new HashSet <Cell>(neighbours); var runner = new LifeRunner(cells); runner.RunCycle(); Assert.DoesNotContain(cell, cells); }
public void EnoughNeighbours_ShouldReproduce( Cell cell, IEnumerable <Cell> neighbours) { var cells = new HashSet <Cell>(neighbours); var runner = new LifeRunner(cells); runner.RunCycle(); Assert.Contains(cell, cells); }
public void SingleCell_ShouldNotSurvive() { var cell = new Cell(); var cells = new HashSet <Cell> { cell }; var runner = new LifeRunner(cells); runner.RunCycle(); Assert.DoesNotContain(cell, cells); }
internal void Tick() { _runner.RunCycle(); }