Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v0 state

Back to all declarations

maxSize

untyped bigint

maxSize 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 bigint

galleryPageSize caps how many pieces Render shows on the home page.

Value

(8 <untyped> bigint)

piece

type

Value

v0.piece

nextID

int

Value

3

RenderDiamond

func(n int) string

RenderDiamond draws a filled diamond of half-width n (2n-1 rows total), each row's stars centered and padded with spaces.

Open
OID
0ccf67…177f:6
RenderDiamond details

Inspect func

RenderPyramid

func(n int) string

RenderPyramid draws a solid triangle n rows tall, widening by two stars per row and centered with leading spaces.

Open
OID
0ccf67…177f:8
RenderPyramid details

Inspect func

RenderSierpinski

func(n int) string

RenderSierpinski 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.

Open
OID
0ccf67…177f:9
RenderSierpinski details

Inspect func

RenderChecker

func(n int) string

RenderChecker draws an n x n checkerboard of # and . cells.

Open
OID
0ccf67…177f:10
RenderChecker details

Inspect func

renderPattern

func(pattern string, size int) string
Open
OID
0ccf67…177f:11
renderPattern details

Inspect func

padID

func(n int) string

padID zero-pads an ID so avl.Tree's key-ordered iteration matches numeric order.

Open
OID
0ccf67…177f:12
padID details

Inspect func

Generate

func(pattern string, size int) string

Generate renders a pattern, adds it to the on-chain gallery, and returns the rendered art.

Open
OID
0ccf67…177f:13
Generate details

Inspect func

escapeInline

func(s string) string

escapeInline neutralizes markdown-active characters in untrusted text before it's embedded inline in Render output.

Open
OID
0ccf67…177f:14
escapeInline details

Inspect func

renderPiece

func(idStr string) string
Open
OID
0ccf67…177f:16
renderPiece details

Inspect func

Render

func(path string) string

Render shows the pattern guide + gallery at "", or one piece by numeric ID.

Open
OID
0ccf67…177f:17
Render details

Inspect func
maxSize : untyped bigint =(32 <untyped> bigint)
galleryPageSize : untyped bigint =(8 <untyped> bigint)
piece : type =v0.piece
nextID : int =3
RenderDiamond : func(n int) string Inspect
RenderPyramid : func(n int) string Inspect
RenderSierpinski : func(n int) string Inspect
RenderChecker : func(n int) string Inspect
renderPattern : func(pattern string, size int) string Inspect
padID : func(n int) string Inspect
Generate : func(pattern string, size int) string Inspect
escapeInline : func(s string) string Inspect
renderHome : func() string Inspect
renderPiece : func(idStr string) string Inspect
Render : func(path string) string Inspect