public GameOfLifeLogic(int width, int height) { gridHeight = height; gridWidth = width; Cells = new Cyclical2DCellArray(width, height); cellsToDie = new List <Cell>(); cellsToBorn = new List <Cell>(); }
public void SetGridSize(int width, int height) { if (gridWidth == width && gridHeight == height) { return; } Cyclical2DCellArray tmp = new Cyclical2DCellArray(width, height); Cells.CopyTo(tmp); Cells = tmp; gridWidth = width; gridHeight = height; }