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

calculateRingFrom function always returns an empty set #55

Closed
Welcius opened this issue Jan 5, 2020 · 2 comments · Fixed by #56
Closed

calculateRingFrom function always returns an empty set #55

Welcius opened this issue Jan 5, 2020 · 2 comments · Fixed by #56

Comments

@Welcius
Copy link

Welcius commented Jan 5, 2020

The calculateRingFrom function is not correct since the return set is never modified, so it's always empty.

Take a look at the implementation here:

https://github.com/Hexworks/mixite/blob/97cf0d0ccce96401318aaa5c4e474310b6cf38ac/mixite.core/core/src/main/kotlin/org/hexworks/mixite/core/internal/impl/HexagonalGridCalculatorImpl.kt

@Welcius Welcius changed the title calculateRingFrom output always returns an empty set calculateRingFrom function always returns an empty set Jan 5, 2020
@Welcius
Copy link
Author

Welcius commented Jan 5, 2020

Also, I think that there is a for loop missing as well, it should loop between neighborIndexes 0..5 (if you check, neighborIndex is never modified).

@adam-arold
Copy link
Member

You're right. I'm not sure how it ended up this way (I don't remember) but I think that this is an incomplete 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 a pull request may close this issue.

2 participants