Skip to content

Last row does not generate right walls properly #2

@boiwantlearncode

Description

@boiwantlearncode

This can be fixed by just swapping the first 2 arguments in the function in line 78. The mergeSets function will make the right cell adopt the id of the left cell. This poses a problem as for the last row, any two cells of the same set should have a wall between them, but by changing the id of the left cell it will be seen as being in a separate set from the right cell. Consequently, the rightWall will be negated and creates a loop. Therefore, the solution is to make the left cell adopt the id of the right cell for the last row.

By the way, thank you for the code, it is easier to understand this than other sources.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions