Пример #1
0
 protected void get_opts(DungeonOptions opts)
 {
     seed            = opts.Seed;
     n_rows          = opts.NRows;
     n_cols          = opts.NCols;
     dungeon_layout  = opts.DungeonLayout;
     room_min        = opts.RoomMin;
     room_max        = opts.RoomMax;
     room_layout     = opts.RoomLayout;
     corridor_layout = opts.CorridorLayout;
     remove_deadends = opts.RemoveDeadends;
     add_stairs      = opts.AddStairs;
 }
        public static dungeon GenerateDungeon()
        {
            DungeonOptions opts = new DungeonOptions()
            {
                Seed           = Seed,
                NRows          = NRows,
                NCols          = NCols,
                DungeonLayout  = DungeonLayout,
                RoomMin        = RoomMin,
                RoomMax        = RoomMax,
                RoomLayout     = RoomLayout,
                CorridorLayout = CorridorLayout,
                RemoveDeadends = RemoveDeadends,
                AddStairs      = AddStairs
            };

            return(new dungeon(opts));
        }
Пример #3
0
 public dungeon(DungeonOptions opts)
 {
     get_opts(opts);
     create_dungeon();
 }