Esempio n. 1
0
        public CellGrid(CellGrid copyGrid)
        {
            gridWidth = copyGrid.GridWidth; gridHeight = copyGrid.GridHeight;

            grid = new Cell[gridHeight, gridWidth];
            for (int i = 0; i < gridHeight; i++)
            {
                for (int j = 0; j < gridWidth; j++)
                {
                    grid[i, j] = new Cell(copyGrid.grid[i,j]);
                }
            }
        }
Esempio n. 2
0
        private void initialize_Grid()
        {
            grid = new Cell[gridHeight, gridWidth];

            for (int i = 0; i < gridHeight; i++)
            {
                for (int j = 0; j < gridWidth; j++)
                {
                    grid[i, j] = new Cell();
                }
            }
        }
Esempio n. 3
0
 public Cell(Cell copyCell)
 {
     state = copyCell.state;
 }