maxSize
untyped bigintmaxSize bounds every pattern's size parameter so a single Generate call can't blow the block gas limit on a pathologically large grid.
Value
(32 <untyped> bigint)
galleryPageSize
untyped bigintgalleryPageSize caps how many pieces Render shows on the home page.
Value
(8 <untyped> bigint)
piece
typeValue
v0.piece
gallery
v0.Tree// zero-padded ID -> \*piece
- OID
- 0ccf67…177f:4
gallery details
nextID
intValue
3
RenderDiamond
func(n int) stringRenderDiamond draws a filled diamond of half-width n (2n-1 rows total), each row's stars centered and padded with spaces.
- OID
- 0ccf67…177f:6
RenderDiamond details
RenderPyramid
func(n int) stringRenderPyramid draws a solid triangle n rows tall, widening by two stars per row and centered with leading spaces.
- OID
- 0ccf67…177f:8
RenderPyramid details
RenderSierpinski
func(n int) stringRenderSierpinski draws a Sierpinski triangle in an n x n grid (n must be a power of two): cell (row, col) is filled exactly when row&col == 0, the classic bitwise identity for Pascal's-triangle-mod-2.
- OID
- 0ccf67…177f:9
RenderSierpinski details
RenderChecker
func(n int) stringRenderChecker draws an n x n checkerboard of # and . cells.
- OID
- 0ccf67…177f:10
RenderChecker details
renderPattern
func(pattern string, size int) string- OID
- 0ccf67…177f:11
renderPattern details
padID
func(n int) stringpadID zero-pads an ID so avl.Tree's key-ordered iteration matches numeric order.
- OID
- 0ccf67…177f:12
padID details
Generate
func(pattern string, size int) stringGenerate renders a pattern, adds it to the on-chain gallery, and returns the rendered art.
- OID
- 0ccf67…177f:13
Generate details
escapeInline
func(s string) stringescapeInline neutralizes markdown-active characters in untrusted text before it's embedded inline in Render output.
- OID
- 0ccf67…177f:14
escapeInline details
renderHome
func() string- OID
- 0ccf67…177f:15
renderHome details
renderPiece
func(idStr string) string- OID
- 0ccf67…177f:16
renderPiece details
Render
func(path string) stringRender shows the pattern guide + gallery at "", or one piece by numeric ID.
- OID
- 0ccf67…177f:17