Honeycombs: Difference between revisions
m
→{{header|Julia}}
Line 1,433:
hexagon(ctx, h::Hexagon) = hexagon(ctx, h.center, h.radius, h.letter, h.color)
function makehoneycomb(ctx
centers = fill(Point(0, 0), hcombdim.rows, hcombdim.cols)
xdelta = 75.0
Line 1,444:
centers
end
push!(win, can)▼
@guarded draw(can) do widget
ctx = getgc(can)
if length(honeycomb) == 0
makehoneycomb(ctx
else
map(c -> hexagon(ctx, honeycomb[c]), collect(keys(honeycomb)))
Line 1,482 ⟶ 1,478:
end
▲push!(win, can)
show(can)
condition = Condition()
|