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;
 }
Example #2
0
    public 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));
    }
 public dungeon(DungeonOptions opts)
 {
     get_opts(opts);
     create_dungeon();
 }