public _2DArray(_2DArray <T> array) { m_Height = array.m_Height; m_Width = array.m_Width; m_Array = new T[m_Height * m_Width]; m_Array = GenericCopier <T[]> .DeepCopy(array.m_Array); }
// Clone the grid. public Grid(Grid grid) { m_Rows = grid.m_Rows; m_Columns = grid.m_Columns; m_Grid = new _2DArray <Cell>(grid.m_Grid); m_InsertedWords = new List <Word>(grid.m_InsertedWords); m_IsEmpty = grid.m_IsEmpty; }
public Grid(int rows, int columns) { m_Rows = rows; m_Columns = columns; m_Grid = new _2DArray <Cell>(rows, columns); m_InsertedWords = new List <Word>(); InitCells(); }