public static Map Load(int width, int height, SpecialMapElement specialMapElement) { RandomMap rndMap = new RandomMap(); Map returnvalue = rndMap.GenerateRandomMap(width, height, specialMapElement); return(returnvalue); }
public static Map Load(int width, int height) { RandomMap rndMap = new RandomMap(); Map returnvalue = rndMap.GenerateRandomMap(width, height); return(returnvalue); //List<GridElement> list = new List<GridElement>(); //for (var i = 0; i < 16; i++) //{ // list.Add(new GridElement() { ImageId = i + "", PassableSides = i, RandomPlacableSides = i }); //} //Grid grid = null; //try //{ // using (var fileStream = System.IO.File.Open(System.IO.Directory.GetCurrentDirectory() + "\\ElementList.xml", System.IO.FileMode.OpenOrCreate)) // { // var serializer = new XmlSerializer(typeof(List<GridElement>)); // serializer.Serialize(fileStream, list); // } // //returnvalue = new Map(grid); //} //catch (Exception) //{ //} //return null; ////GridElement[][] arr = null; ////var grid = new Grid(); ////grid.GridElementCollection[0][0] = new GridElement() { ImageId }
public static Map Load(int width, int height) { RandomMap rndMap = new RandomMap(); Map returnvalue = rndMap.GenerateRandomMap(width, height); return returnvalue; //List<GridElement> list = new List<GridElement>(); //for (var i = 0; i < 16; i++) //{ // list.Add(new GridElement() { ImageId = i + "", PassableSides = i, RandomPlacableSides = i }); //} //Grid grid = null; //try //{ // using (var fileStream = System.IO.File.Open(System.IO.Directory.GetCurrentDirectory() + "\\ElementList.xml", System.IO.FileMode.OpenOrCreate)) // { // var serializer = new XmlSerializer(typeof(List<GridElement>)); // serializer.Serialize(fileStream, list); // } // //returnvalue = new Map(grid); //} //catch (Exception) //{ //} //return null; ////GridElement[][] arr = null; ////var grid = new Grid(); ////grid.GridElementCollection[0][0] = new GridElement() { ImageId }
public static Map Load(int width, int height, SpecialMapElement specialMapElement) { RandomMap rndMap = new RandomMap(); Map returnvalue = rndMap.GenerateRandomMap(width, height, specialMapElement); return returnvalue; }