NAME
Game::TextMapper::Gridmapper - generate dungeon maps
DESCRIPTION
This generates dungeon maps. At its core, this uses a 3×3 layout, 9 sections total. 5 or 7 of these 9 sections get a room. The connections for the rooms is picked at random from a fixed list of configurations (plus mirrored and rotated variants). The first room contains the stairs.
To generate bigger dungeons, more of these 3×3 layouts are added to the first. As the number of rooms is dynamic, the algorithm figures out how to best use a number of layouts containing 5 or 7 rooms tp get to that number, and then simply drops the extra rooms.