Beispiel #1
0
        // an initial create-map method
        public T GenMap(ulong seed)
        {
            // may not need floor ID
            T map = (T)Activator.CreateInstance(typeof(T));

            map.InitSeed(seed);

            GenContextDebug.DebugInit(map);

            // postprocessing steps:
            StablePriorityQueue <Priority, IGenStep> queue = new StablePriorityQueue <Priority, IGenStep>();

            foreach (Priority priority in this.GenSteps.GetPriorities())
            {
                foreach (IGenStep genStep in this.GenSteps.GetItems(priority))
                {
                    queue.Enqueue(priority, genStep);
                }
            }

            ApplyGenSteps(map, queue);

            map.FinishGen();

            return(map);
        }