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

Out of bounds? #73

Open
Collederas opened this issue Jul 22, 2022 · 1 comment
Open

Out of bounds? #73

Collederas opened this issue Jul 22, 2022 · 1 comment

Comments

@Collederas
Copy link

Hello,

What is preventing stack.top() from being (0,0) and so this lambda to return a negative number (-m_nMazeWidth) as a result when offsetting to (-1, 0) or (0, -1)?

https://github.com/OneLoneCoder/videos/blob/537664947db31529d2d2236deda9105ca19c041c/OneLoneCoder_Mazes.cpp#L115

@Collederas
Copy link
Author

Answering myself, it's the checks for Stack.Last().Y > 0 and Stack.Last().X > 0 when adding the neighbors.

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

No branches or pull requests

1 participant