Skip to content

[Bug]: Trémaux’ algorithm passage marks are not correct under certain conditions #2

@Ijee

Description

@Ijee

What happened?

When creating mazes with most algorithms, there is currently a problem with how the algorithm marks entrances/exits for passages that are within 2 nodes of each other (see screenshot). The markings are currently tracked as a node weight, which is incorrect.

Using the node.text property is also not ideal, as it makes the information unreadable on most screen sizes (e.g., formatting like "1 / 2") and it would also not be clear which number is belongs to which passage.

There likely needs to be an option to show custom symbols, as demonstrated in this GIF:
https://de.wikipedia.org/wiki/Tr%C3%A9maux%E2%80%99_Methode#/media/Datei:Tremaux'_Methode_-_animiertes_Beispiel-schnell.gif

Using the node-status property is one possibility, but I do not really like it because it is not intended for this use case, really. We likely need a new property specifically for such things which the node component will then handle.

Reproduction steps

  1. Create a maze that has lots of passages close to each other
  2. Run the Trémaux' algorithm
  3. You will see passage entrances that have been marked more than 2 times that should not have been possible

Version

1.2.2

What browser did you use?

Chrome, Firefox

Screenshots (optional)

image

Console Logs (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    UXUX Related enhancement / bugbugBugpath findingThis is related to one of the pathfinding algorithms

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions