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

Spiral iteration #18

Open
cormullion opened this issue Jul 12, 2022 · 0 comments
Open

Spiral iteration #18

cormullion opened this issue Jul 12, 2022 · 0 comments

Comments

@cormullion
Copy link

Hi! Don't know if this package is still being maintained, but I was interested to trying to understand how the spiral iteration works. I can't understand the error message I get:

using  Hexagons

h = hexagon(1, 2)

# this works

println("neighbors")
for n in neighbors(h)
    @show n
end 

# this works
println("ring")
for n in ring(1, h)
    @show n
end

# but this errors

println("spiral")
for n in spiral(1, h)
    @show n
end

ERROR: UndefVarError: start not defined
Stacktrace:
 [1] iterate(it::HexagonSpiralIterator)
   @ Hexagons ~/.julia/packages/Hexagons/qn1vZ/src/Hexagons.jl:295
 [2] top-level scope
   @ ./Untitled-1:21
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