Example #1
0
 public GameOfLifeLogic(int width, int height)
 {
     gridHeight  = height; gridWidth = width;
     Cells       = new Cyclical2DCellArray(width, height);
     cellsToDie  = new List <Cell>();
     cellsToBorn = new List <Cell>();
 }
Example #2
0
        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;
        }