With some help from chat I sorted out how to randomize rooms without overlap.
This commit is contained in:
parent
47c0d4a5f0
commit
fb41c153c1
6 changed files with 126 additions and 52 deletions
|
|
@ -45,9 +45,9 @@ void WorldBuilder::generate_map() {
|
|||
maze::Builder maze($map);
|
||||
|
||||
maze.hunt_and_kill();
|
||||
maze.init();
|
||||
maze.clear();
|
||||
|
||||
maze.randomize_rooms();
|
||||
maze.randomize_rooms(ROOM_SIZE);
|
||||
|
||||
if($map.width() > 20) {
|
||||
maze.inner_box(4, 2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue