private static SaveData.SerializableMapDictionary ConvertMapForSaving(Cell[,] map) { var height = map.GetLength(0); var width = map.GetLength(1); var convertedCells = new SaveData.SerializableMapDictionary(); for (var currentRow = 0; currentRow < height; currentRow++) { for (var currentColumn = 0; currentColumn < width; currentColumn++) { var currentCell = map[currentRow, currentColumn]; var tempSdo = CellSdo.ConvertToCellSdo(currentCell); convertedCells.Add(currentCell.Id, tempSdo); } } return(convertedCells); }
public CellSdo ConvertToCellSdo() { return(CellSdo.ConvertToCellSdo(this)); }