public Map(string mapPath, IMapSaver saver, IMapLoader loader, IMapFiller filler) { this._saver = saver; this._loader = loader; this._filler = filler; _tilesMap = loader.LoadMapFromBmp(); _playerCount = 0; tileWidth = _gameFieldWidth / _tilesMap.GetLength(1); tileHeight = _gameFieldHeight / _tilesMap.GetLength(0); FillTileMap(); FillPoints(); }
public Map(int[,] tilesMap, IMapSaver saver, IMapLoader loader, IMapFiller filler) { this._saver = saver; this._loader = loader; this._filler = filler; _tilesMap = tilesMap; _playerCount = 0; tileWidth = _gameFieldWidth / tilesMap.GetLength(1); tileHeight = _gameFieldHeight / tilesMap.GetLength(0); FillTileMap(); GetEmptySpaces(); }