MapData = function (dungeonConfig) {
	return createMapData(dungeonConfig);
};

function createMapData(dungeonConfig) 
{


	var _width = ROT.RNG.getUniformInt(dungeonConfig.minWidth, dungeonConfig.maxWidth);
	var _height = ROT.RNG.getUniformInt(dungeonConfig.minHeight, dungeonConfig.maxHeight);

	var _tiles = new Array(_width);
	for (var x = 0; x < _width; x++) {
		_tiles[x] = new Array(_height);
	}

	var getWidth = function () {
		return _width;
	};

	var getHeight = function () {
		return _height;
	};

	var getTiles = function () {
		return _tiles;
	};

	var addTile = function (tile, x, y) {
		tile.setPosition(x, y);
		_tiles[x][y] = tile;
	};

	var getTile = function (x, y) {
		return _tiles[x][y];
	};

	var map = {};
	map.getWidth = getWidth;
	map.getHeight = getHeight;
	map.getTiles = getTiles;
	map.addTile = addTile;
	map.getTile = getTile;
	return map;
}