public void Then_the_cell_is_alive() { var cellAlive = false; var startingGrid = new Grid(new LiveCell(2, 0), new LiveCell(1, 1), new LiveCell(0, 2)); GridIterator.NextEvolution(startingGrid).GetCellState(new Coordinate(1, 1), () => cellAlive = true, () => cellAlive = false); Assert.IsTrue(cellAlive); }
public void Then_the_cell_dies() { var cellAlive = false; var startingGrid = new Grid(new LiveCell(0, 0)); GridIterator.NextEvolution(startingGrid).GetCellState(new Coordinate(0, 0), () => cellAlive = true, () => cellAlive = false); Assert.IsFalse(cellAlive); }