Exemplo 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]);
                }
            }
        }
Exemplo 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();
                }
            }
        }
Exemplo n.º 3
0
 public Cell(Cell copyCell)
 {
     state = copyCell.state;
 }