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

fix: Make adjacent nodes in hex have dist 1 #174

Merged

Conversation

benjamanjiman
Copy link
Contributor

Previously the nodes were separated in the y axis by 1, which results in adjacent nodes forming isosceles triangles instead of equilaterals. Scaling the nodes vertically to shrink the distance between nodes results in adjacent nodes having distance one. This commit contains one failing test for the purpose of demonstrating the requirement for re-initialisation.

Previously the nodes were separated in the y axis by 1, which results
in adjacent nodes forming isosceles triangles instead of equilaterals.
Scaling the nodes vertically to shrink the distance between nodes
results in adjacent nodes having distance one. This commit contains
one failing test for the purpose of demonstrating the requirement
for re-initialisation.
@benjamanjiman
Copy link
Contributor Author

benjamanjiman commented Nov 16, 2023

Discussed briefly in #173

@JustGlowing
Copy link
Owner

great job! No changes are required and I'll be merging this next week.

Sticking this image here for reference
image

from: https://www.redblobgames.com/grids/hexagons/#spacing

@JustGlowing JustGlowing added the to-be-merged PR that will be merged soon label Nov 17, 2023
@JustGlowing JustGlowing merged commit 6d1f8ef into JustGlowing:master Nov 24, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to-be-merged PR that will be merged soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants