示例#1
0
        public static Map Load(int width, int height, SpecialMapElement specialMapElement)
        {
            RandomMap rndMap      = new RandomMap();
            Map       returnvalue = rndMap.GenerateRandomMap(width, height, specialMapElement);

            return(returnvalue);
        }
示例#2
0
        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
        }
示例#3
0
        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
        }
示例#4
0
        public static Map Load(int width, int height, SpecialMapElement specialMapElement)
        {
            RandomMap rndMap = new RandomMap();
            Map returnvalue = rndMap.GenerateRandomMap(width, height, specialMapElement);

            return returnvalue;
        }