ondras / rot.js

ROguelike Toolkit in JavaScript. Cool dungeon-related stuff, interactive manual, documentation, tests!
https://ondras.github.io/rot.js/hp/
BSD 3-Clause "New" or "Revised" License
2.33k stars 254 forks source link

Fix dividedmaze #169

Closed kosinaz closed 4 years ago

kosinaz commented 4 years ago

The DividedMaze generator algorithm allowed holes on the walls on odd coordinates, and that prevented additional wall building on both sides of that hole, resulting in mazes with some 3-wide corridors.

As a simple fix, I have added an extra check for each of the four walls to only store their even coordinates in the list of potential hole coordinates.

kosinaz commented 4 years ago

See the before and after example. current fixed

ondras commented 4 years ago

Great, thanks!

kosinaz commented 4 years ago

Sorry, I haver accidentally added the two images as well. Feel free to delete them.

Also, see my related comment in #76 about my further plans on DividedMaze. I'm happy to contribute if you think they are matching with your intentions.

ondras commented 4 years ago

Also, see my related comment in #76 about my further plans on DividedMaze. I'm happy to contribute if you think they are matching with your intentions.

Why not! If you manage to maintain API compatibility and set those options to defaults that provide the current implementation...