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

v1 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

piece carries no ID field: the id belongs to the store, which hands it back on lookup and iteration.

Value

v1.piece

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
0b977c…8ee2:7
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
0b977c…8ee2:9
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
0b977c…8ee2:10
RenderSierpinski details

Inspect func

RenderChecker

func(n int) string

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

Open
OID
0b977c…8ee2:11
RenderChecker details

Inspect func

renderPattern

func(pattern string, size int) string
Open
OID
0b977c…8ee2:12
renderPattern 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
0b977c…8ee2:13
Generate details

Inspect func

renderPiece

func(idStr string) string
Open
OID
0b977c…8ee2:15
renderPiece details

Inspect func

Render

func(path string) string

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

Open
OID
0b977c…8ee2:16
Render details

Inspect func
maxSize : untyped bigint =(32 <untyped> bigint)
galleryPageSize : untyped bigint =(8 <untyped> bigint)
piece : type =v1.piece
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
Generate : func(pattern string, size int) string Inspect
renderHome : func() string Inspect
renderPiece : func(idStr string) string Inspect
Render : func(path string) string Inspect