-Universe::Universe(int w, int h, int sec_w, int sec_h, int numres)
-: w(w)
-, h(h)
-, numres(numres)
-, total(w * h)
-, sec_begin(reinterpret_cast<Sector *>(new char[total * sizeof(Sector)]))
-, sec_end(sec_begin + total) {
- for (Sector *i = sec_begin; i < sec_end; ++i) {
- new (i) Sector(sec_w, sec_h, numres);
- }