Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dividedmaze #169

Merged
merged 2 commits into from
Nov 25, 2019
Merged

Fix dividedmaze #169

merged 2 commits into from
Nov 25, 2019

Conversation

kosinaz
Copy link
Contributor

@kosinaz kosinaz commented Nov 24, 2019

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
Copy link
Contributor Author

kosinaz commented Nov 24, 2019

See the before and after example.
current
fixed

@ondras
Copy link
Owner

ondras commented Nov 25, 2019

Great, thanks!

@ondras ondras merged commit 5b5b21b into ondras:master Nov 25, 2019
@kosinaz
Copy link
Contributor Author

kosinaz commented Nov 25, 2019

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
Copy link
Owner

ondras commented Nov 26, 2019

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants