Beispiel #1
0
 public TGridGame(int rows, int cols)  // se unod dei due parametri vale zero, devo fare eseguire un eccezione
 {
     _nRow = rows;
     _nCol = cols;
     _Cells = new TCell[_nRow, _nCol]; 
     
     for (int r = 0; r < _nRow; r++)
         for (int c = 0; c < _nCol; c++)
             _Cells[r, c] = new TCell();
 }
Beispiel #2
0
 public TGridGame()
 {
     _nRow = _DefaultRow;
     _nCol = _DefaultCol;
     _Cells = new TCell[_nRow, _nCol]; 
     
     for (int r = 0; r < _nRow; r++)
         for (int c = 0; c < _nCol; c++)
             _Cells[r, c] = new TCell();
 }