public static Floor ToFloor(FloorData floor) { Floor result = new Floor(floor.r.Length, 5); result.OccupiedRooms = floor.occ; result.Rooms = floor.r; result.Traps = floor.t; return result; }
public static Building Generate(int floors, int rooms, int maxItemsPerRoom, int lootBias) { Building result = new Building(); result.Floors = new Floor[floors]; Random random = new Random(DateTime.Now.Millisecond); for (int f = 0; f < floors; f++) { Floor floor = new Floor(rooms, maxItemsPerRoom); floor.Populate(BuildingRandom, result, lootBias); result.Floors[f] = floor; } return result; }