private bool[][] CreateGridToHostCells(IWorldCells worldCells) { if (worldCells is null) { throw new ArgumentNullException(nameof(worldCells), "Please Provide Cells for World Creation. "); } var cells = ((WorldCells)worldCells).Cells; var grid = new bool[cells.Length][]; for (int x = 0; x < cells.Length; ++x) { grid[x] = new bool[cells[x].Length]; } return(grid); }
public WorldGrid Clone(IWorldCells worldCells) { return(new WorldGrid(worldCells)); }
public WorldGrid(IWorldCells cells) { WorldCells = cells; Grid = CreateGridToHostCells(cells); }