Skip to content

Infelicity in maze generation code #2

@arranstewart

Description

@arranstewart

This looks like a bug, if we intend to properly implement Prim's algorithm - we should be happy to punch a hole in any direction, not just the south or east. This possibly explains why the mazes seem unusually dull.

The fix is - we should keep track of cells on the border with any unvisited neighbour, not just one to the south or east. But if the neighbour is to the north or west, it's the neighbour that will change the state of its walls, not us.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions