Now the rooms are better at having good doors.
This commit is contained in:
parent
908f5bfb3e
commit
8e2a691337
8 changed files with 69 additions and 70 deletions
|
|
@ -16,11 +16,11 @@ namespace maze {
|
|||
Room $no_rooms_region{0,0,0,0};
|
||||
// BUG: instead of bool map it to the room?
|
||||
std::unordered_map<Point, bool> $doors;
|
||||
Pathing $paths;
|
||||
Pathing $pathing;
|
||||
|
||||
Builder(Map& map) :
|
||||
$width(map.$width), $height(map.$height), $walls(map.$walls),
|
||||
$rooms(map.$rooms), $dead_ends(map.$dead_ends), $paths{$width, $height}
|
||||
$rooms(map.$rooms), $dead_ends(map.$dead_ends), $pathing{$width, $height}
|
||||
{
|
||||
dbc::check($width % 2 == 1, "map width not an ODD number (perimter dead ends bug)");
|
||||
dbc::check($height % 2 == 1, "map height not an ODD number (perimter dead ends bug)");
|
||||
|
|
@ -46,6 +46,7 @@ namespace maze {
|
|||
bool repair();
|
||||
void punch_dead_end(size_t at_x, size_t at_y, size_t x, size_t y);
|
||||
bool space_available(size_t x, size_t y);
|
||||
int compute_paths(size_t x, size_t y);
|
||||
};
|
||||
|
||||
std::pair<Builder, bool> script(Map& map, nlohmann::json& config);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue