public void createMap(int cols, int rows) { this.map.cells = new List<Cell>(); this.map.height = (uint)rows; this.map.width = (uint)cols; for (uint i = 0; i < cols; i++) { for (uint j = 0; j < rows; j++) { Cell cell = new Cell(i, j, new Border(false, false), false, true); this.map.cells.Add(cell); } } }
public void addCell(int x, int y) { if (!this.cellExists(x, y)) { Cell cell = new Cell((uint)x, (uint)y, new Border(false, false), false, false); this.map.cells.Add(cell); } }