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

golf state

Back to all declarations

wearCells

untyped bigint

Value

(128 <untyped> bigint)

maxData

untyped bigint

maxData bounds a version's data: a hole at every limit of the format is about 21 KB.

Value

(32768 <untyped> bigint)

Publish

func(slot string, hexData string, note string) string

Publish puts a course hole's data into its slot as its next version and returns the new id ("garden/7/v2"). Only the owner can. hexData is the hole as course.Encode wrote it, in hex. slot must be the data's own world and order ("garden/7", order 1 to 999), so a mis-edited file cannot replace the wrong hole; the course holds at most 9999 slots (maxCourse). Data identical to the current version's is refused. The version it replaces is archived: its records stay, its bests leave the course standings. note (at most 140 characters, cleaned) says why.

Open
OID
08cda7…5c9f:3
Publish details

Inspect func

PublishMine

func(slug string, hexData string, note string) string

PublishMine publishes a community hole of the caller's own and returns its id: "\<caller>/\<slug>/v1", then v2 and on. Anyone can while publishing is open (SetPublishing); only the same address adds versions. slug is 1 to 32 of a-z, 0-9 and "-". The data is checked as Publish checks it, its world and order aside; its name and note carry no web address. It is playable and recorded, in no cup and not in the course ranking; a new version of a hidden hole stays hidden. The publisher pays the storage deposit (about half a GNOT a version), and nothing published can be deleted.

Open
OID
08cda7…5c9f:5
PublishMine details

Inspect func

newestRow

func(a string) string

newestRow is the height of an author's newest row in byAuthor ("\<address> \<height> \<slug>"), "" if they have none.

Open
OID
08cda7…5c9f:6
newestRow details

Inspect func

moveAuthor

func(a string, was string, now string)

moveAuthor moves an author's own row in byAuthor (recentKey(height, address)) from the height was to now, "" for none: it stays at their newest row's, and goes with their last.

Open
OID
08cda7…5c9f:7
moveAuthor details

Inspect func

linkish

func(s string) bool

linkish spots a web address in a community hole's name or note: "www.", a dot between a letter or digit and two letters ("claim.xyz", "t.me"; not "e.g."), or an IP address, look-alike dots (.。․﹒) read as dots, letters in any case. Basic (the owner can Hide what gets past) and strict on purpose ("St.Andrews" is refused). It reads s a byte at a time: every mark is ASCII, so a non-ASCII character is decoded only to tell İ and the Kelvin sign (which lower-case to ASCII), the look-alike dots and spaces apart.

Open
OID
08cda7…5c9f:8
linkish details

Inspect func

decodeData

func(hexData string) (*course.Simple, string, string)

decodeData checks a version's data as it arrives: hex, GG1 within the format's limits, stored lengths bit-exact (DecodeChecked: every later Decode trusts them), and in the one form Encode gives.

Open
OID
08cda7…5c9f:11
decodeData details

Inspect func

nothingNew

func(old *golf.entry) string

nothingNew refuses data identical to the alias's current version: it would reset the hole's ranking for nothing.

Open
OID
08cda7…5c9f:12
nothingNew details

Inspect func

dataEntry

func(alias string, n int, h *course.Simple, by .uverse.address, sum string, note string) *golf.entry
Open
OID
08cda7…5c9f:13
dataEntry details

Inspect func

worlds

[]struct{...} (len=5)

worlds is the course's worlds in play order, with their names on the page.

Open
OID
08cda7…5c9f:15
worlds details (len=5)

+5 more Inspect slice

worldRank

func(w string) int

worldRank is a world's place among worlds; any other comes after.

Open
OID
08cda7…5c9f:21
worldRank details

Inspect func

slotKey

func(world string, order int) string

slotKey is a slot's key: its world's rank, the world, and the order in three digits, so the slots tree is in course order.

Open
OID
08cda7…5c9f:22
slotKey details

Inspect func

slotKeyOf

func(slot string) (string, bool)

slotKeyOf reads a slot, "world/order" (as "garden/7"), into its key.

Open
OID
08cda7…5c9f:23
slotKeyOf details

Inspect func

HoleData

func(hole string) string

HoleData is a version's GG1, in hex, as it was published (an alias gives its current version's): what a golf/v2 or an auditor reads back.

Open
OID
08cda7…5c9f:25
HoleData details

Inspect func

Current

func(alias string) string

Current is the id of the version an alias ("garden/7", "\<address>/\<slug>") plays now, "" if the alias has none.

Open
OID
08cda7…5c9f:26
Current details

Inspect func

Versions

func(alias string) string

Versions is every version of an alias, oldest first (the newest pageMax if there are more): its id, number, the height it was published at, by whom, its data's sha256, its note, and the version that took its place. slot is the alias, "" (and no versions) for one that has none.

Open
OID
08cda7…5c9f:27
Versions details

Inspect func

firstVersion

func(now *golf.entry) int

firstVersion is the oldest of now's versions a list shows: the newest pageMax are (now is its alias's current version).

Open
OID
08cda7…5c9f:28
firstVersion details

Inspect func

BestOf

func(hole string, mode string, player .uverse.address) int

BestOf is a player's best finished round on a hole in a mode, 0 if none.

Open
OID
08cda7…5c9f:29
BestOf details

Inspect func

maxPower

untyped bigdec

Value

(10.0 <untyped> bigdec)

maxShots

untyped bigint

Value

(12 <untyped> bigint)

errShot

untyped string

The refusals said in more than one place.

Value

"golf: a shot is an angle and a power between 0 and 10"

errStrokeLimit

untyped string

The refusals said in more than one place.

Value

"golf: this round is over its stroke limit, Reset to play again"

errShotTooHeavy

untyped string

The refusals said in more than one place.

Value

"golf: one shot on this hole could cost more than a transaction can replay"

errTooStormy

untyped string

The refusals said in more than one place.

Value

"golf: in its dearest weather, a commit on this hole would leave too little room for a shot"

errUnknownHole

untyped string

The refusals said in more than one place.

Value

"golf: unknown hole: "

entry

type

Value

golf.entry

record

type

record is the hole's record in one mode: who holds it, in how many strokes, 0 if never completed.

Value

golf.record

bestOf

func(r *golf.round) string

bestOf is how a best is kept: "\<strokes> \<height> \<period> \<shots>". The height ranks it before a later tie (boardKey); the period and shots let Ghost replay it in its own weather. The mode is in the key.

Open
OID
08cda7…5c9f:30
bestOf details

Inspect func

errBest

untyped string

errBest is a best not as bestOf writes it: never written, refused if read.

Value

"golf: a best not as bestOf writes it: "

bestStrokes

func(v interface{...}) int

bestStrokes is a kept best's strokes, 0 for none (a tree's nil).

Open
OID
08cda7…5c9f:32
bestStrokes details

Inspect func

bestFields

func(v interface{...}) (int64, int64, string)

bestFields is a kept best's height, period and shots.

Open
OID
08cda7…5c9f:33
bestFields details

Inspect func

view

type

view is the rows of a shared index under prefix p, read and written without it. p ends with a space, which no id holds, so its rows are exactly the keys from p to p with the space made a "!".

Value

golf.view

before

func(t *v0.BPTree, k string) int

before is how many keys of t sort before k: a binary search by index.

Open
OID
08cda7…5c9f:34
before details

Inspect func

seeded

func() *v0.BPTree

seeded is a shared index whose first leaf the deployer pays at init, not its first player. Its key "" sorts before every view's rows: no view sees it.

Open
OID
08cda7…5c9f:35
seeded details

Inspect func

newEntry

func(id string, name string, par int, world string, order float64) *golf.entry
Open
OID
08cda7…5c9f:36
newEntry details

Inspect func

draining

type

draining is an archived hole's drain, per mode: the next player to take out, whether all are out, and the players whose first finish came after it was archived: never counted, so never taken out.

Value

golf.draining

round

type

Value

golf.round

assisted

untyped bigint

A round is played in one of two modes, each with its own records and rankings: assisted (the full aim preview) or pro (the preview cut short). The chain cannot see a screen: the mode is the player's word.

Value

(0 <untyped> bigint)

pro

untyped bigint

A round is played in one of two modes, each with its own records and rankings: assisted (the full aim preview) or pro (the preview cut short). The chain cannot see a screen: the mode is the player's word.

Value

(1 <untyped> bigint)

modes

untyped bigint

A round is played in one of two modes, each with its own records and rankings: assisted (the full aim preview) or pro (the preview cut short). The chain cannot see a screen: the mode is the player's word.

Value

(2 <untyped> bigint)

modeOf

func(name string) int

modeOf reads a mode's name: "assisted" (or "") or "pro"; anything else panics rather than answer for another mode.

Open
OID
08cda7…5c9f:37
modeOf details

Inspect func

modeTitles

[2]string

modeTitles is how the pages head a mode's board.

Open
OID
08cda7…5c9f:41
modeTitles details

Inspect array

courseHoles

*v0.BPTree

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:43
courseHoles details

Inspect pointer

community

*v0.BPTree

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:46
community details

Inspect pointer

holeData

*v0.BPTree

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:49
holeData details

Inspect pointer

slots

*v0.BPTree

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:52
slots details

Inspect pointer

aliases

*v0.BPTree

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:55
aliases details

Inspect pointer

byAuthor

*v0.BPTree

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:58
byAuthor details

Inspect pointer

hidden

*v0.Tree

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:61
hidden details

Inspect pointer

archived

*v0.BPTree

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:64
archived details

Inspect pointer

rounds

*v0.BPTree

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:67
rounds details

Inspect pointer

bests

*v0.BPTree

bests is the version's results in mode m: player address -> their best finished round there, kept across replays, as bestOf writes it.

Open
OID
08cda7…5c9f:75
bests details

Inspect pointer

boards

*v0.BPTree

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:83
boards details

Inspect pointer

allTotals

*v0.BPTree

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:91
allTotals details

Inspect pointer

totals

[2]golf.view

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:99
totals details

Inspect array

allRanks

*v0.BPTree

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:103
allRanks details

Inspect pointer

ranks

[2]golf.view

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:111
ranks details

Inspect array

idle

[2]golf.view

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Open
OID
08cda7…5c9f:115
idle details

Inspect array

archiving

[]string

The indexes are B+ trees (32 entries a leaf: far cheaper an entry than an AVL node). What players add goes to five of them, shared by every version and mode and seeded at init (views): a first player pays for their own rows only. A B+ tree must not change while it is iterated: no callback below writes to the tree it walks (drain walks a hole's bests and writes the standings).

Value

<zero>

row

type

row is one player's standing across the course: their best on each hole counted, summed, and those holes' pars, summed. Its score against par, strokes - par, is what ranks it after its holes.

Value

golf.row

topSize

untyped bigint

Value

(10 <untyped> bigint)

named

func(player string) bool

named reports whether a player has a gno.land name (r/sys/users). Only named players rank: a name takes a registration, so a script cannot fill the boards with free addresses. Every finish is still kept.

Open
OID
08cda7…5c9f:119
named details

Inspect func

nameOf

func(player string) string

nameOf is a named player's name, "" for anyone else.

Open
OID
08cda7…5c9f:120
nameOf details

Inspect func

nameish

func(n string) bool

nameish is a name as r/sys/users registers it (a-z, then a-z, 0-9, "\_" and "-", at most 64), checked again because the pages print names in links.

Open
OID
08cda7…5c9f:121
nameish details

Inspect func

find

func(id string) *golf.entry

find is the hole with this exact id, nil if none.

Open
OID
08cda7…5c9f:122
find details

Inspect func

current

func(alias string) string

current is the id an alias points at now: a course slot's or a community hole's current version; "" if it is neither.

Open
OID
08cda7…5c9f:123
current details

Inspect func

mustHole

func(id string) *golf.entry

mustHole is the hole a write names: its exact id. An alias is refused: a new version may have taken its place since the round's shots were chosen.

Open
OID
08cda7…5c9f:124
mustHole details

Inspect func

readHole

func(id string) *golf.entry

readHole is the hole a read names: an exact id, or an alias for its current version.

Open
OID
08cda7…5c9f:125
readHole details

Inspect func

recentKey

func(height int64, what string) string

recentKey orders by height, then by what is at that height.

Open
OID
08cda7…5c9f:126
recentKey details

Inspect func

pad

func(n int, width int) string

pad writes n in width digits, zeros first: keys that sort as numbers.

Open
OID
08cda7…5c9f:127
pad details

Inspect func

rankKey

func(r *golf.row) string

rankKey orders the course ranking: most holes first, then the best score against par (a hole at par counts the same whatever its par), then the first there, then the address. The score is signed: vsParBias puts it in seven digits. The holes take five: a standing can count more than the course's slots while a republished hole drains (its old best still counts, its new one adds a hole), so they get room well past maxCourse.

Open
OID
08cda7…5c9f:128
rankKey details

Inspect func

maxCourse

untyped bigint

maxCourse bounds the course's slots (Publish); a standing's holes are at most those plus the archived versions drain has not taken it out of yet. vsParBias is more than a standing can be under or over par: a hole is -18 to +59 (1 to 60 strokes, par 1 to 19), so a full course at most 9999 \* 59 = 589,941 over, 179,982 under, and the seven digits hold 55,555 holes.

Value

(9999 <untyped> bigint)

vsParBias

untyped bigint

maxCourse bounds the course's slots (Publish); a standing's holes are at most those plus the archived versions drain has not taken it out of yet. vsParBias is more than a standing can be under or over par: a hole is -18 to +59 (1 to 60 strokes, par 1 to 19), so a full course at most 9999 \* 59 = 589,941 over, 179,982 under, and the seven digits hold 55,555 holes.

Value

(1000000 <untyped> bigint)

boardKey

func(v interface{...}, player string) string

boardKey orders a hole's board by each player's best v: fewest strokes, then the first to make them (a best's shots are public: whoever replays them ties it and ranks after), then the address.

Open
OID
08cda7…5c9f:129
boardKey details

Inspect func

boardStrokes

func(k string) int

boardStrokes is the strokes of a board's key: always its three digits.

Open
OID
08cda7…5c9f:130
boardStrokes details

Inspect func

setRow

func(m int, r *golf.row, holes int, strokes int, par int, at int64)

setRow moves a player's standing, as of height at, and keeps the ranking in step. A standing with no hole left is not freed, nor its key, which moves to idle: its deposit is the player's, and freeing it would refund whoever drained it. It moves back at the player's next hole.

Open
OID
08cda7…5c9f:131
setRow details

Inspect func

improve

func(m int, player string, par int, was int, best int)

improve moves a player's standing by a new best on an official hole of par par (was: their old best there, 0 if none): only those count, or anyone's own hole would be a way to the top. The standing is kept, not recomputed, so a finish costs the same however many play.

Open
OID
08cda7…5c9f:132
improve details

Inspect func

retire

func(old *golf.entry, next string)

retire archives an official hole replaced by next. Its bests stay there as its records but leave the course standings, in batches (drain): the Publish takes retireBatch, each course finish finishBatch, a Drain up to drainMax.

Open
OID
08cda7…5c9f:133
retire details

Inspect func

retireBatch

untyped bigint

How many archived players a Publish, a course finish and a Drain take out of the standings: sized so none costs more however many played.

Value

(150 <untyped> bigint)

finishBatch

untyped bigint

How many archived players a Publish, a course finish and a Drain take out of the standings: sized so none costs more however many played.

Value

(4 <untyped> bigint)

drainMax

untyped bigint

How many archived players a Publish, a course finish and a Drain take out of the standings: sized so none costs more however many played.

Value

(400 <untyped> bigint)

drain

func(n int)

drain takes up to n archived players out of the standings, oldest archived hole first.

Open
OID
08cda7…5c9f:134
drain details

Inspect func

Drain

func(n int) int

Drain takes up to n players (1 to 400) of archived holes out of the course standings, sooner than the finishes would, and returns how many archived holes still have players in them. Anyone can call it. A standing it empties is kept at 0 holes (setRow): nothing is refunded to the caller.

Open
OID
08cda7…5c9f:135
Drain details

Inspect func

counts

func(e *golf.entry, m int, player string, was int) bool

counts reports whether a best on e by player (was: their previous best, 0 if none) moves their standing: e is a current official hole, or an archived one whose drain has not reached them yet and where they already counted. A first finish on an archived hole never counts.

Open
OID
08cda7…5c9f:136
counts details

Inspect func

Launch

func(hole string, angle float64, power float64) string

Launch plays one shot of the caller's round on hole (an exact id): angle in degrees (0 = right, 90 = down), power in (0, 10]. It is how gnoweb plays, with no aim preview, so its rounds are pro rounds. It answers with where the ball stopped, or the score if holed; PlayRoundAt commits many shots.

Open
OID
08cda7…5c9f:137
Launch details

Inspect func

aim

func(from physics.Vec2, cup physics.Vec2) (float64, float64)

aim is the angle, in the shot's degrees, and the straight-line distance from a ball to the cup: walls and slopes are the player's to allow for.

Open
OID
08cda7…5c9f:138
aim details

Inspect func

PlayRound

func(hole string, shots string) string

PlayRound is PlayRoundAt in the current period, for a caller with none to give (a form, a script); a round under way keeps its own. Prefer PlayRoundAt: a commit included after the weather turned is then played in the weather its shots were chosen in.

Open
OID
08cda7…5c9f:139
PlayRound details

Inspect func

PlayRoundAt

func(hole string, shots string, period int64) string

PlayRoundAt replays shots into the caller's assisted round on hole (an exact id), continuing it, in the weather of period: the current one or the one before, and a round under way keeps its own. The client sends decisions, never outcomes: the chain replays them. shots is "angle,power\[,tick];…" (MsgCall carries no slice), at most 12, fewer on a heavy hole: a commit past the work budget is refused with the number of shots that fit, and the rest goes in the next commit.

Open
OID
08cda7…5c9f:140
PlayRoundAt details

Inspect func

PlayRoundPro

func(hole string, shots string, period int64) string

PlayRoundPro is PlayRoundAt for a round played in pro mode: the aim preview cut short. It counts on the pro records and rankings only.

Open
OID
08cda7…5c9f:141
PlayRoundPro details

Inspect func

playRound

func(e *golf.entry, player .uverse.address, shots string, period int64, mode int) string
Open
OID
08cda7…5c9f:142
playRound details

Inspect func

otherMode

func(r *golf.round) string

otherMode refuses to go on with a round in a mode it was not started in.

Open
OID
08cda7…5c9f:143
otherMode details

Inspect func

shotList

func(shots string) []string

shotList is a commit's shots: the non-empty entries of "a,p;a,p;…", at least one and at most maxShots.

Open
OID
08cda7…5c9f:144
shotList details

Inspect func

work

type

work is a commit's estimated gas so far. A shot counts the larger of its path's estimate and its Shot.Work's, plus its pulses' set-up, on top of what the commit spent before its shots (fixed: decoding, forecast). A shot that could pass workBudget is refused before anything is kept, and each is played under a work cap (physics.Field.Cap), so no commit can pass it; the client mirrors the model. An estimate, not a gas meter: see docs/golf.md, "The work budget".

Value

golf.work

workBudget

untyped bigint

The budget: of the 2e9 gas a wallet lets a transaction simulate, 1.4e9 for a commit, decoding and forecast included; the rest for package loads and bookkeeping.

Value

(1400000000 <untyped> bigint)

workPerShot

untyped bigint

The budget: of the 2e9 gas a wallet lets a transaction simulate, 1.4e9 for a commit, decoding and forecast included; the rest for package loads and bookkeeping.

Value

(10000000 <untyped> bigint)

workPerWall

untyped bigint

The budget: of the 2e9 gas a wallet lets a transaction simulate, 1.4e9 for a commit, decoding and forecast included; the rest for package loads and bookkeeping.

Value

(150000 <untyped> bigint)

workPerPoint

untyped bigint

The budget: of the 2e9 gas a wallet lets a transaction simulate, 1.4e9 for a commit, decoding and forecast included; the rest for package loads and bookkeeping.

Value

(1200000 <untyped> bigint)

workPerPiece

untyped bigint

The budget: of the 2e9 gas a wallet lets a transaction simulate, 1.4e9 for a commit, decoding and forecast included; the rest for package loads and bookkeeping.

Value

(15000 <untyped> bigint)

workPerUnit

untyped bigint

The budget: of the 2e9 gas a wallet lets a transaction simulate, 1.4e9 for a commit, decoding and forecast included; the rest for package loads and bookkeeping.

Value

(1000 <untyped> bigint)

workPerPulseWall

untyped bigint

The budget: of the 2e9 gas a wallet lets a transaction simulate, 1.4e9 for a commit, decoding and forecast included; the rest for package loads and bookkeeping.

Value

(700000 <untyped> bigint)

workPerPulsePost

untyped bigint

The budget: of the 2e9 gas a wallet lets a transaction simulate, 1.4e9 for a commit, decoding and forecast included; the rest for package loads and bookkeeping.

Value

(200000 <untyped> bigint)

decodeBase

untyped bigint

Decoding a hole's data costs at most decodeBase and decodePerByte a byte.

Value

(6000000 <untyped> bigint)

decodePerByte

untyped bigint

Decoding a hole's data costs at most decodeBase and decodePerByte a byte.

Value

(4000 <untyped> bigint)

fixedGas

func(e *golf.entry, fc course.Forecast) int64

fixedGas is what a commit on e spends before its shots, in the forecast fc: decoding the hole, and drawing the forecast.

Open
OID
08cda7…5c9f:145
fixedGas details

Inspect func

decodeGas

func(size int) int64

decodeGas bounds decoding size bytes of a hole's data.

Open
OID
08cda7…5c9f:146
decodeGas details

Inspect func

maxShotGas

untyped bigint

maxShotGas bounds a hole's heaviest shot (shotBound and its pulses' set-up): a hole past it is refused at publish.

Value

(1300000000 <untyped> bigint)

minShotWork

untyped bigint

minShotWork is the work, in the physics' units, a commit's first shot may always do whatever the weather: four fifths of MaxWork. A shot is capped at what is left of the budget (work.next), so a hole whose dearest weather would leave less is refused at publish (worstGas): on a published hole, every shot of less than minShotWork plays out in any weather (as a commit's first, if need be), and an author whose board is too heavy is told at publish, not by a hole that misbehaves in the rain. A shot past it may be cut short; none is known: the course's heaviest real shot does 441,737 over the full grid of tee shots (mountain/16, full power, in a storm), and the heaviest found in an adversarial search 0.74 of MaxWork (docs/golf.md); the course's tightest room in its dearest weather is 839,278 (mountain/7), 39,278 over the floor.

Value

(800000 <untyped> bigint)

worstGas

func(h *course.Simple, size int) int64

worstGas is what a commit on h (size bytes of data) spends up to a first shot of minShotWork in its dearest weather: decoding, the forecast at its most (course.WorstForecastWork), and the shot, its walls and its pulses' set-up, as work.next caps it.

Open
OID
08cda7…5c9f:147
worstGas details

Inspect func

newWork

func(h *course.Simple, weather []physics.Zone) *golf.work

newWork is a commit's work on a hole, before any shot: its walls and pieces, a pulse's as if always there, and the weather's.

Open
OID
08cda7…5c9f:148
newWork details

Inspect func

shotBound

func(walls int64) int64

shotBound is the most one shot on a board of walls walls can cost: the physics ends a stroke at MaxWork, passing it by MaxWorkStep at most.

Open
OID
08cda7…5c9f:149
shotBound details

Inspect func

pieces

func(ws []physics.Wall, ps []physics.Post, zs []physics.Zone) int64

pieces counts what a ball is tested against: each wall, post and zone, and each edge of a zone's polygon.

Open
OID
08cda7…5c9f:150
pieces details

Inspect func

Reset

func(hole string)

Reset abandons the caller's round under way on hole (an exact id), freeing its storage: the next stroke starts a new one from the tee. A finished round is not kept (its best is), so a new one needs no Reset. With no round under way it does nothing, and says nothing.

Open
OID
08cda7…5c9f:151
Reset details

Inspect func

validShot

func(angle float64, power float64) (float64, float64)

validShot refuses what would poison a round and returns the shot as recorded. NaN and infinities pass every comparison, so they are refused by name. The power is quantized before it is checked (0.00001 would round to 0). The angle is brought into (-360, 360), so a huge one cannot overflow to NaN in the physics, and again after rounding (-359.99996 is -0, not -360).

Open
OID
08cda7…5c9f:152
validShot details

Inspect func

resolve

func(shot physics.Shot, holed bool) (physics.Shot, bool)

resolve checks what the physics returned for a stroke: a path a read may print, and a ball that is a number. A hole is anyone's data.

Open
OID
08cda7…5c9f:153
resolve details

Inspect func

back

func(h *course.Simple, from physics.Vec2, shot physics.Shot, holed bool) physics.Shot

back brings a ball that came to rest off the board (a leak in a hole's walls) back to from, where the shot started; the stroke counts, with no penalty. Every stroke golf plays or replays goes through it.

Open
OID
08cda7…5c9f:154
back details

Inspect func

stroke

func(e *golf.entry, h *course.Simple, r *golf.round, player .uverse.address, angle float64, power float64, tick int, weather []physics.Zone) (physics.Shot, bool)

stroke resolves one shot into the round and reports whether it was holed.

Open
OID
08cda7…5c9f:155
stroke details

Inspect func

seat

func(e *golf.entry, m int, p string, best interface{...})

seat puts a named player where their best puts them: on the hole's board, in its record if it tops it, and in the course ranking if they stand in it. Every finish does it, improved or not, so a player named since ranks.

Open
OID
08cda7…5c9f:156
seat details

Inspect func

Claim

func() int

Claim ranks the caller's bests kept while they had no name: on the boards of the course's current holes, in both modes, and in the course ranking. It returns how many bests it seated, and refuses a caller with no gno.land name. It reads the course's holes only, so it costs the same for everyone.

Open
OID
08cda7…5c9f:157
Claim details

Inspect func

maxRoundStrokes

untyped bigint

maxRoundStrokes bounds a round's history (Round shows it); maxPath the path a hole may return for a stroke (an honest one: a few hundred points).

Value

(60 <untyped> bigint)

maxPath

untyped bigint

maxRoundStrokes bounds a round's history (Round shows it); maxPath the path a hole may return for a stroke (an honest one: a few hundred points).

Value

(512 <untyped> bigint)

q4

func(x float64) float64

q4 rounds to the precision a shot is recorded at.

Open
OID
08cda7…5c9f:158
q4 details

Inspect func

maxTick

untyped bigint

maxTick bounds the third field of a shot: any timed piece turns in fewer.

Value

(1023 <untyped> bigint)

parseShot

func(s string) (float64, float64, int)

parseShot reads "angle,power" or "angle,power,tick". The tick is where the timed pieces were when the player let go (0 if absent), clamped to 0..maxTick.

Open
OID
08cda7…5c9f:159
parseShot details

Inspect func

clampTick

func(t string, shot string) int

clampTick reads a tick: an optional sign and digits, clamped to 0..maxTick, even past what an int holds.

Open
OID
08cda7…5c9f:160
clampTick details

Inspect func

roundOf

func(e *golf.entry, h *course.Simple, player .uverse.address) *golf.round

roundOf is the player's round under way on e, or a new one from the tee, not stored: its commit stores it if it does not finish it.

Open
OID
08cda7…5c9f:161
roundOf details

Inspect func

maxName

untyped bigint

maxName and maxNote bound a hole's name and a version's note.

Value

(40 <untyped> bigint)

maxNote

untyped bigint

maxName and maxNote bound a hole's name and a version's note.

Value

(140 <untyped> bigint)

cleanName

func(n string) string

cleanName keeps a hole's name to one short line of plain text (cleanText), with at least a letter or a digit in it.

Open
OID
08cda7…5c9f:162
cleanName details

Inspect func

cleanText

func(n string, max int) string

cleanText keeps an author's text to one line of plain text, at most max characters: no control, format (Cf: bidi, zero-width, tags) or nonspacing (Mn: stacked accents, variation selectors) characters, no blank-looking ones, nothing that ends a markdown table cell or opens a link, a tag, an HTML entity, a strikethrough, a mention or an email link.

Open
OID
08cda7…5c9f:163
cleanText details

Inspect func

maxSkin

untyped bigint

maxSkin bounds a skin's length.

Value

(24 <untyped> bigint)

cleanSkin

func(s string) string

cleanSkin keeps a skin to what it is meant to be: a short lower-case id.

Open
OID
08cda7…5c9f:164
cleanSkin details

Inspect func

owner

.uverse.address

Value

<gnolang.StringValue>

pending

.uverse.address

Value

<zero>

self

string

self is golf's own pkgpath, hub its gnoweb path: every link follows from them, so the same code serves under any namespace.

Value

"gno.land/r/nym-alexiscolin000/gnogolf/golf"

hub

string

self is golf's own pkgpath, hub its gnoweb path: every link follows from them, so the same code serves under any namespace.

Value

"/r/nym-alexiscolin000/gnogolf/golf"

officialPrefix

string

// the namespace's realms, as "…/"

Value

"gno.land/r/nym-alexiscolin000/gnogolf/"

playURL

string

playURL is the 3D client every page links to (SetPlayURL moves it).

Value

"https://gnogolf.xyz/"

successor

string

successor is the realm that took this course over, "" until the owner names it, once (SetSuccessor).

Value

""

setUp

func(deployer .uverse.address, chainID string)

setUp is init: the deployer owns the course, and community publishing starts closed. Only \`gno test\` (chain "dev") runs it with no signer: the owner stays "", which holds no power, and publishing starts open, since nobody there could open it.

Open
OID
08cda7…5c9f:174
setUp details

Inspect func

Successor

func() string

Successor is the realm that took this course over, "" if none.

Open
OID
08cda7…5c9f:177
Successor details

Inspect func

isOwner

func(caller .uverse.address) bool

isOwner is the one owner check: a live role, held by the caller.

Open
OID
08cda7…5c9f:178
isOwner details

Inspect func

Transfer

func(to .uverse.address)

Transfer offers the role to another address, which takes it with Accept. Offering it to the owner themselves cancels an offer.

Open
OID
08cda7…5c9f:179
Transfer details

Inspect func

Accept

func()

Accept takes the role a Transfer offered the caller.

Open
OID
08cda7…5c9f:180
Accept details

Inspect func

Renounce

func()

Renounce gives the role up for good: no owner, no offer, and none possible.

Open
OID
08cda7…5c9f:181
Renounce details

Inspect func

maxURL

untyped bigint

maxURL bounds the play link, maxPkgPath a successor's pkgpath.

Value

(100 <untyped> bigint)

maxPkgPath

untyped bigint

maxURL bounds the play link, maxPkgPath a successor's pkgpath.

Value

(100 <untyped> bigint)

SetPlayURL

func(url string)

SetPlayURL moves the link every page gives to the 3D client. Only the owner can. url is https://, at most 100 of letters, digits and "-.\_~/:%", with no query or fragment: a hole's link adds "?cup=…&hole=…" to it.

Open
OID
08cda7…5c9f:182
SetPlayURL details

Inspect func

SetSuccessor

func(pkgpath string)

SetSuccessor names the realm that takes this course over, once and for good: a pkgpath under gno.land/r/, not golf itself, with no "", "." or ".." segment. Only the owner can. It moves and blocks nothing: the pages and Holes say where the course went, and play goes on here. golf does not check the realm exists: check the path before sending.

Open
OID
08cda7…5c9f:184
SetSuccessor details

Inspect func

Hide

func(slot string, hide bool)

Hide takes a community hole ("\<address>/\<slug>", every version) off the lists (the hub, Holes, the 3D game), for a scam or abuse in its name or note; hide=false puts it back. Only the owner can. Its data, rounds and page stay, Community still has it, and a new version stays hidden. A hole already as asked is left alone, with no event.

Open
OID
08cda7…5c9f:185
Hide details

Inspect func

publishing

bool

publishing is whether anyone can publish a community hole (PublishMine): closed at deploy (setUp), opened later without a redeploy.

Value

false

Publishing

func() bool

Publishing is whether PublishMine is open.

Open
OID
08cda7…5c9f:187
Publishing details

Inspect func

SetPublishing

func(open bool)

SetPublishing opens community publishing (PublishMine) or closes it again. Only the owner can. Closing stops new holes and versions only: every hole published stays playable and listed. Setting it as it is does nothing.

Open
OID
08cda7…5c9f:188
SetPublishing details

Inspect func

validPkgPath

func(p string) bool
Open
OID
08cda7…5c9f:189
validPkgPath details

Inspect func

EventHolePublished

untyped string

// hole, slot, sha, by, official ("true"/"false")

Value

"HolePublished"

EventHoleRetired

untyped string

// hole, next

Value

"HoleRetired"

EventShot

untyped string

// hole, player, strokes, mode, shot ("angle,power,tick" as recorded)

Value

"Shot"

EventHoled

untyped string

// hole, player, strokes, mode, shots (the round's)

Value

"Holed"

EventRoundReset

untyped string

// hole, player

Value

"RoundReset"

EventOwnershipOffered

untyped string

// owner, to

Value

"OwnershipOffered"

EventOwnershipOfferCancelled

untyped string

// owner

Value

"OwnershipOfferCancelled"

EventOwnershipTransfer

untyped string

// from, to

Value

"OwnershipTransfer"

EventOwnershipRenounced

untyped string

// from

Value

"OwnershipRenounced"

EventPlayURLSet

untyped string

// url

Value

"PlayURLSet"

EventSuccessorSet

untyped string

// successor

Value

"SuccessorSet"

EventHoleHidden

untyped string

// slot, hidden ("true"/"false")

Value

"HoleHidden"

EventPublishingSet

untyped string

// open ("true"/"false")

Value

"PublishingSet"

wearRunes

untyped string

// pristine grass blank: a shot's dots stand out on it

Value

" :;x%"

wearLight

untyped bigint

wearRunes draw a cell's wear: none, then up to wearLight, wearWorn and wearGroove balls come to rest there, and past.

Value

(2 <untyped> bigint)

wearWorn

untyped bigint

wearRunes draw a cell's wear: none, then up to wearLight, wearWorn and wearGroove balls come to rest there, and past.

Value

(6 <untyped> bigint)

wearGroove

untyped bigint

wearRunes draw a cell's wear: none, then up to wearLight, wearWorn and wearGroove balls come to rest there, and past.

Value

(14 <untyped> bigint)

maxTunnels

untyped bigint

maxTunnels is how many tunnels the board numbers, 1 to 9.

Value

(9 <untyped> bigint)

markWall

rune

Value

35

markPost

rune

Value

48

markCup

rune

// not O: in gnoweb's font O and the post's 0 look alike

Value

85

markTee

rune

Value

42

Render

func(path string) string

Render is the game as text: gnoweb draws the board and submits the shot. Paths: "" the hub; "\<world>" a cup's holes; "\<address>" the holes an address published; "\<hole>" a hole's page, "\<hole>/\<address>" the same with that player's ball, "\<hole>/data" a version's provenance and data. \<hole> is a version's id or an alias. A query string ("?…") is ignored.

Open
OID
08cda7…5c9f:190
Render details

Inspect func

noSuch

func(path string) string

noSuch is the page for a path that is no hole, cup or address.

Open
OID
08cda7…5c9f:192
noSuch details

Inspect func

lookup

func(id string) *golf.entry

lookup is readHole that answers nil for no hole.

Open
OID
08cda7…5c9f:193
lookup details

Inspect func

cupName

func(w string) string

cupName is how a world is called on the page.

Open
OID
08cda7…5c9f:195
cupName details

Inspect func

who

func(addr string) string

who is a player as a link to their gno.land profile.

Open
OID
08cda7…5c9f:196
who details

Inspect func

moved

func() string

moved is the banner a course taken over shows on every page.

Open
OID
08cda7…5c9f:198
moved details

Inspect func

renderCup

func(world string) string

renderCup is a cup's page: its current holes, in order.

Open
OID
08cda7…5c9f:199
renderCup details

Inspect func

renderAuthor

func(a .uverse.address) string

renderAuthor is the holes an address published, as their current versions.

Open
OID
08cda7…5c9f:200
renderAuthor details

Inspect func

bestCell

func(e *golf.entry, names map[string]string) string

bestCell is a hole's records, assisted then pro, for a table cell. names caches holders: r/sys/users is read once a player, not once a record.

Open
OID
08cda7…5c9f:201
bestCell details

Inspect func

weatherNote

func(f course.Forecast) string

weatherNote is the hole's weather now (f, the forecast of this period) and how long it lasts, on a hole's own page.

Open
OID
08cda7…5c9f:202
weatherNote details

Inspect func

noAdmin

func() string

noAdmin states who can change what, the owner's own powers included.

Open
OID
08cda7…5c9f:203
noAdmin details

Inspect func

source

func(e *golf.entry) string

source links a hole's data page: read it before trusting it with a round.

Open
OID
08cda7…5c9f:204
source details

Inspect func

md

func(label string, href string) string
Open
OID
08cda7…5c9f:205
md details

Inspect func

vsPar

func(d int) string

vsPar is a score against par: "even", "+3", "-2" (ufmt has no %+d).

Open
OID
08cda7…5c9f:206
vsPar details

Inspect func

flatRolls

untyped string

flatRolls is how far a shot rolls on flat grass (a tee shot's Kick, the usual friction).

Value

"On flat grass a power of 10 rolls about 40, a 5 about 15."

renderHole

func(e *golf.entry, h *course.Simple, focus .uverse.address) string
Open
OID
08cda7…5c9f:207
renderHole details

Inspect func

roundSummary

func(e *golf.entry, p .uverse.address, r *golf.round) string

roundSummary is how a player stands on the hole: their round under way, if any, and their best in each mode, with where it puts them on the hole's board, or why nowhere. A holed round is not kept: its best is.

Open
OID
08cda7…5c9f:208
roundSummary details

Inspect func

shotsOf

func(shots string) string

shotsOf is a round's shots for a page: golf's own "%.4f,%.4f,%d", digits and punctuation only.

Open
OID
08cda7…5c9f:209
shotsOf details

Inspect func

renderData

func(e *golf.entry) string

renderData is a data version's page: where it came from, its versions, and its data, which is all the hole there is.

Open
OID
08cda7…5c9f:210
renderData details

Inspect func

board

func(e *golf.entry, h *course.Simple, f *physics.Field, mine *golf.round, now course.Forecast) string

board is the version's board in mode m: boardKey(best, player) -> player, the named players' bests, fewest strokes first.

Open
OID
08cda7…5c9f:211
board details

Inspect func

drawZone

func(g [][]int32, z *physics.Zone, m int32)

drawZone marks the cells whose centre the zone holds, as the physics sees it (physics.Zone.Contains): a polygon's row from where the centre line crosses its edges, an ellipse's as the run the physics' test finds from its middle.

Open
OID
08cda7…5c9f:212
drawZone details

Inspect func

boxCells

func(lo float64, hi float64, n int) (int, int)

boxCells is the cells from int(lo) to int(hi), within 0..n, whose centre lies in \[lo, hi): the cells the physics' box test takes.

Open
OID
08cda7…5c9f:213
boxCells details

Inspect func

cellAt

func(c float64, lo int, hi int) int

cellAt is the first cell in \[lo, hi), lo >= 0, whose centre is at or past c (!(x+0.5 \< c), as the physics compares), hi if none: ceil(c-0.5).

Open
OID
08cda7…5c9f:214
cellAt details

Inspect func

firstCell

func(lo int, hi int, ok func(...)) int

firstCell is the first x in \[lo, hi) where ok turns true, hi if it never does: ok is false up to some x, and true from there.

Open
OID
08cda7…5c9f:215
firstCell details

Inspect func

fillRow

func(row []int32, from int, to int, m int32)
Open
OID
08cda7…5c9f:216
fillRow details

Inspect func

span

func(lo float64, hi float64, n int) (int, int)

span is the cells from int(lo) to int(hi), within 0..n.

Open
OID
08cda7…5c9f:217
span details

Inspect func

maxBoardWork

untyped bigint

maxBoardWork bounds a board's drawing, in thousands of gas (boardWork): past it the page does not draw, far under the 3e9 a query may use.

Value

(600000 <untyped> bigint)

boardWork

func(f *physics.Field, h *course.Simple) int

boardWork estimates board's cost in thousands of gas, with measured weights: a board cell; a cell and a polygon edge per row of a zone's box (every edge counted as crossing, as a zigzag's do); a step along a wall; a cell of a post's box.

Open
OID
08cda7…5c9f:218
boardWork details

Inspect func

key

func(b string, walls string) string

key names the board's fixed marks it shows (tee and cup always), with the skins of the walls drawn \`#\`.

Open
OID
08cda7…5c9f:219
key details

Inspect func

legend

func(f *physics.Field) (string, string)

legend names the pieces the hole gave a skin (a slope with the way it falls), and the skins of its \`#\` walls.

Open
OID
08cda7…5c9f:220
legend details

Inspect func

mark

func(m int32, def int32) int32

mark counts a ball come to rest in wear cell i.

Open
OID
08cda7…5c9f:221
mark details

Inspect func

wearRune

func(wear []int, x int, y int) int32

wearRune takes wear-cell coordinates.

Open
OID
08cda7…5c9f:222
wearRune details

Inspect func

trace

func(g [][]int32, s physics.Segment, c int32)

trace draws a wall as points every half unit, put inlined: a board has thousands.

Open
OID
08cda7…5c9f:223
trace details

Inspect func

fill

func(g [][]int32, c physics.Circle, r int32)

fill draws a post: the cells whose centre is within its radius. LenCmp skips Len's software square root.

Open
OID
08cda7…5c9f:224
fill details

Inspect func

put

func(g [][]int32, p physics.Vec2, c int32)
Open
OID
08cda7…5c9f:225
put details

Inspect func

blankUnreachable

func(g [][]int32, wall [][]int32, f *physics.Field, seeds []physics.Vec2)

blankUnreachable clears the cells no ball can reach: a flood fill from the tee, the cup and where tunnels and hazards put the ball, stopped by walls.

Open
OID
08cda7…5c9f:227
blankUnreachable details

Inspect func

race

func(e *golf.entry, p string, label string) string

race is the 3D game's dare link (by=): this hole against p's best's ghost.

Open
OID
08cda7…5c9f:228
race details

Inspect func

byName

func(addr string) string

byName is a player by their gno.land name when they have one.

Open
OID
08cda7…5c9f:229
byName details

Inspect func

count

func(n int, what string) string

count is n things, said right for one.

Open
OID
08cda7…5c9f:230
count details

Inspect func

HoleState

func(hole string) string

HoleState is the hole as JSON for a client: geometry, skins (names the client looks up), weather and wear, all it needs to draw the hole and aim. hole is a version's id or an alias; "hole" in the answer is always the version's id, the one to write with, with its "slot" and "v", and an archived one's "next". A shot's path (Round, Simulate\*) is the flight the chain computed: replay it, never re-simulate. Points far apart are a tunnel: do not interpolate.

Open
OID
08cda7…5c9f:231
HoleState details

Inspect func

roundJSON

func(e *golf.entry, h *course.Simple, player string, r *golf.round) string

roundJSON is one player's round: ball rounded, rest exact (for SimulateFrom) and the last stroke replayed: rounds store shots, not paths.

Open
OID
08cda7…5c9f:233
roundJSON details

Inspect func

lastShot

func(h *course.Simple, r *golf.round, fc course.Forecast) physics.Shot

lastShot replays a round's last stroke, read-only, with its stroke number, tick and weather (fc, its period's forecast): the same flight, less the wear. Empty before a first one.

Open
OID
08cda7…5c9f:234
lastShot details

Inspect func

pathJSON

func(ps []physics.Vec2) string

pathJSON is a shot's path points, comma separated.

Open
OID
08cda7…5c9f:235
pathJSON details

Inspect func

airOf

func(s physics.Shot) string

airOf is a shot's air flags, one character per path point: "0001100…".

Open
OID
08cda7…5c9f:236
airOf details

Inspect func

Round

func(hole string, player .uverse.address) string

Round is one player's round under way on a hole with its last stroke's path, or null if they have none: never started, holed (its best is kept: Ghost) or Reset. It costs one stroke of gas.

Open
OID
08cda7…5c9f:237
Round details

Inspect func

jnum

func(v float64) string

jnum is a number with 3 decimals, the bytes of ufmt's "%.3f" at a fraction of its gas. NaN and Inf, not JSON, print 0. Below 1e12, v\*1000 is within 1.2e-4 of the exact decimal, so its integer part decides the rounding unless the fraction is within 1e-3 of a half: those, and huge numbers, go to strconv, which is exact.

Open
OID
08cda7…5c9f:239
jnum details

Inspect func

jexact

func(v physics.Vec2) string

jexact is a point exactly, as the shortest decimals that read back as the same float64: what a client hands back to SimulateFrom.

Open
OID
08cda7…5c9f:240
jexact details

Inspect func

versionJSON

untyped string

versionJSON opens every object a read returns.

Value

"\"version\":1"

jstr

func(s string) string

jstr quotes an author's string so it cannot break out of its JSON. Every byte below 0x20 is escaped: one in one hole's name would make Holes() invalid JSON for every client.

Open
OID
08cda7…5c9f:242
jstr details

Inspect func

Holes

func() string

Holes lists at most maxListed holes for a client's menu, as listed orders them: the course's current holes, its latest archived versions, then community holes, newest first, perAuthor an address, none hidden (the rest are in Community). official marks the course's holes, the only ones in a cup and the course ranking; next is the version that replaced a hole, slot its alias, play the 3D client's link, successor the realm that took the course over ("" if none). It decodes nothing.

Open
OID
08cda7…5c9f:243
Holes details

Inspect func

holeRow

func(e *golf.entry) string

holeRow is one hole as Holes and Community list it.

Open
OID
08cda7…5c9f:244
holeRow details

Inspect func

Community

func(after string, limit int) string

Community is a page of every community hole, every version of each, by id: all that Holes leaves out. It is paged like Records.

Open
OID
08cda7…5c9f:245
Community details

Inspect func

perAuthor

untyped bigint

perAuthor is the most published holes of one address Holes and the hub list: one address publishing a hundred cannot push everyone else's out.

Value

(3 <untyped> bigint)

listed

func() []*golf.entry

listed is the holes in list order, at most maxListed: every current course hole in course order; then, if minCommunity places stay free, up to maxArchived archived course versions, latest archived first; then, in the room left, the newest shown community holes (current, not hidden) among each author's perAuthor newest, by block height then alias, last first. An author fills perAuthor rows at most, however many holes they publish. It reads about what it lists: authors latest first, perAuthor keys each, until an author's latest is older than every row kept (room+1 authors at most). Hidden holes have no byAuthor row: nothing hidden is walked.

Open
OID
08cda7…5c9f:246
listed details

Inspect func

authorRows

untyped string

authorRows is past the last of byAuthor's author rows ("\<height> \<address>") and before its first hole ("g1…"): no key is ":".

Value

":"

maxArchived

untyped bigint

maxArchived bounds the archived course versions Holes and the hub list, and minCommunity is the room they leave for community holes.

Value

(20 <untyped> bigint)

minCommunity

untyped bigint

maxArchived bounds the archived course versions Holes and the hub list, and minCommunity is the room they leave for community holes.

Value

(20 <untyped> bigint)

SimulateFrom

func(hole string, ballX float64, ballY float64, shot string, stroke int, period int64) string

SimulateFrom previews one shot, read-only: from an exact ball (a "rest" answered before), shot "angle,power,tick", its stroke number (0 is the first; timed and pulse holes change with it) and any period not ahead. It is what PlayRoundAt would play, for one shot's gas. As a vm/qeval query it needs no transaction or wallet: a client animates a shot the instant it is released.

Open
OID
08cda7…5c9f:247
SimulateFrom details

Inspect func

validStroke

func(stroke int)
Open
OID
08cda7…5c9f:248
validStroke details

Inspect func

onBoard

func(h *course.Simple, x float64, y float64) physics.Vec2

onBoard refuses a ball off the board (or NaN): no round leaves one there.

Open
OID
08cda7…5c9f:249
onBoard details

Inspect func

shotJSON

func(shot physics.Shot) string

shotJSON is a shot's path, air, cause, work (Shot.Work, which a client adds up as a commit does) and exact resting point.

Open
OID
08cda7…5c9f:250
shotJSON details

Inspect func

SimulateRound

func(hole string, shots string) string

SimulateRound replays a shot list from the tee, read-only, and returns its last shot and stroke count: what PlayRound would record, refusals included. Continue from an exact "rest" (SimulateFrom): rounded points are for drawing.

Open
OID
08cda7…5c9f:251
SimulateRound details

Inspect func

SimulateRoundAt

func(hole string, shots string, period int64) string

SimulateRoundAt is SimulateRound in a period's weather, the current one or the one before, as a round's first stroke: it agrees with PlayRoundAt.

Open
OID
08cda7…5c9f:252
SimulateRoundAt details

Inspect func

SimulateRoundIn

func(hole string, shots string, period int64) string

SimulateRoundIn is SimulateRound in any period gone by, to check a recorded round as the chain played it. Weather still to come is refused.

Open
OID
08cda7…5c9f:253
SimulateRoundIn details

Inspect func

SimulateCommit

func(hole string, ballX float64, ballY float64, stroke int, shots string, period int64) string

SimulateCommit previews the next PlayRoundAt (or PlayRoundPro) commit, read-only: shots from the exact ball ("rest") at stroke number stroke (0 is the first) in period's weather. It refuses what that commit would (too much work, too many strokes, a weather over), so a client checks every commit before it signs any. JSON as SimulateRound; strokes counts after the commit.

Open
OID
08cda7…5c9f:254
SimulateCommit details

Inspect func

simulateRound

func(hole string, from *physics.Vec2, strokes int, shots string, period int64) string

simulateRound is the SimulateRound\* and SimulateCommit replay: from nil is the tee, and the first shot is stroke number strokes.

Open
OID
08cda7…5c9f:255
simulateRound details

Inspect func

boardJSON

func(h *course.Simple) string
Open
OID
08cda7…5c9f:256
boardJSON details

Inspect func

wallsJSON

func(ws []physics.Wall) string
Open
OID
08cda7…5c9f:257
wallsJSON details

Inspect func

postsJSON

func(ps []physics.Post) string
Open
OID
08cda7…5c9f:258
postsJSON details

Inspect func

zonesJSON

func(zs []physics.Zone, flags bool) string

zonesJSON is a hole's zones, or the weather's (forecastJSON: no flags). With flags, "air" and "capped" are printed only when true.

Open
OID
08cda7…5c9f:259
zonesJSON details

Inspect func

timingJSON

func(every int, on int, phase int) string

timingJSON is a timed piece's clock (a tram, a storm's gusts); nothing for an untimed one.

Open
OID
08cda7…5c9f:260
timingJSON details

Inspect func

polyJSON

func(z *physics.Zone) string

polyJSON is a polygon zone's outline, and whether it is the outside of it; nothing for the usual rectangle or ellipse.

Open
OID
08cda7…5c9f:261
polyJSON details

Inspect func

Extras

func(hole string, stroke int) string

Extras is what a timed hole adds at one stroke of a round (0 is the first), to draw over HoleState's field. Empty for other holes.

Open
OID
08cda7…5c9f:262
Extras details

Inspect func

Leaderboard

func(mode string) string

Leaderboard is a mode's course-wide top ten ("assisted" or "pro"): named players' bests on the current course holes, summed; most holes, then the best score against par (strokes - par), then the first there. Its cost does not grow with players.

Open
OID
08cda7…5c9f:263
Leaderboard details

Inspect func

eachRanked

func(m int, fn func(...))

eachRanked walks a mode's top ten: the first named players of its ranking, with their names. A name deleted since is skipped, not shown.

Open
OID
08cda7…5c9f:264
eachRanked details

Inspect func

maxWalked

untyped bigint

maxWalked is the most rows a top ten walks, skipped names included.

Value

(40 <untyped> bigint)

strokesRow

func(p string, name string, strokes int) string

strokesRow and standingRow are a player's best or standing row; name is "" on the reads that resolve no names. A standing's par is its holes' pars summed: strokes - par is its score against par.

Open
OID
08cda7…5c9f:265
strokesRow details

Inspect func

standingRow

func(p string, name string, r *golf.row) string
Open
OID
08cda7…5c9f:266
standingRow details

Inspect func

standingFields

func(r *golf.row) string

standingFields is a standing's numbers: holes, strokes and par.

Open
OID
08cda7…5c9f:267
standingFields details

Inspect func

nameField

func(name string) string
Open
OID
08cda7…5c9f:268
nameField details

Inspect func

Rank

func(mode string, player .uverse.address) string

Rank is a player's place in a mode's course ranking, with their standing: "rank" 1 is the top, out of "of"; 0 if unnamed or no current course hole finished. A name deleted since keeps its place until its next change, so a rank may be that many too low.

Open
OID
08cda7…5c9f:269
Rank details

Inspect func

CourseLeaderboard

func(mode string, offset int, limit int) string

CourseLeaderboard is a page of a mode's course ranking, paged like HoleLeaderboard. holes is the course's current holes, players how many the ranking holds.

Open
OID
08cda7…5c9f:270
CourseLeaderboard details

Inspect func

Ghost

func(hole string, mode string, player .uverse.address) string

Ghost is a player's best round on a hole in a mode, named or not, with its height (the first to a score ranks first), period and shots, or null: what a duel races. It replays in its own weather (SimulateRoundIn for the first stroke, then SimulateFrom from each rest).

Open
OID
08cda7…5c9f:271
Ghost details

Inspect func

HoleRank

func(hole string, mode string, player .uverse.address) string

HoleRank is a player's place on a hole's board in a mode, with their best, as Rank: 0 if unnamed or no finish there.

Open
OID
08cda7…5c9f:272
HoleRank details

Inspect func

maxListed

untyped bigint

maxListed bounds Holes() and the hub: anyone can add a hole.

Value

(120 <untyped> bigint)

HoleLeaderboard

func(hole string, mode string, offset int, limit int) string

HoleLeaderboard is a page of a hole's board in a mode: named players' bests, fewest strokes then first there, from rank offset+1 (clamped to 0..players), at most limit rows (1..100). players is the named players, finished anyone who finished; next is the next offset, 0 at the end. A name deleted since is skipped, so a page may hold fewer rows. A page reads its own rows only.

Open
OID
08cda7…5c9f:273
HoleLeaderboard details

Inspect func

pageMax

untyped bigint

pageMax is the most rows one page of a read returns.

Value

(100 <untyped> bigint)

clampLimit

func(n int) int

clampLimit keeps a page's size to 1..pageMax.

Open
OID
08cda7…5c9f:274
clampLimit details

Inspect func

maxFriends

untyped bigint

maxFriends bounds the addresses one Bests or Standings read takes.

Value

(50 <untyped> bigint)

friends

func(list string) []string

friends splits a comma-separated list of addresses: each valid one once, at most maxFriends. Junk and repeats are skipped and use up nothing.

Open
OID
08cda7…5c9f:275
friends details

Inspect func

Bests

func(hole string, mode string, players string) string

Bests is the best finished round on one hole, in a mode, of each of the given players (comma-separated addresses, named or not): a board of friends, where no stranger and no bot can push anyone off.

Open
OID
08cda7…5c9f:276
Bests details

Inspect func

Standings

func(mode string, players string) string

Standings is each given player's course-wide standing in a mode: how many of the course's current holes they finished, in how many strokes, and those holes' pars summed.

Open
OID
08cda7…5c9f:277
Standings details

Inspect func

Records

func(hole string, mode string, after string, limit int) string

Records is a page of every player's best on a hole in a mode, named or not, with the height that ranks it before a later tie: all a successor needs to carry the boards over in their order. The paged reads (Records, Players, Community) walk everything by key: after is the last key of the page before ("" for the first), limit is clamped to 1..100, next is the after of the next page ("" at the end).

Open
OID
08cda7…5c9f:278
Records details

Inspect func

Players

func(mode string, after string, limit int) string

Players is a page of every course standing in a mode, named or not: its holes, strokes and par (all the ranking's key reads) and the height of the finish that last improved it (the tie-break), paged like Records.

Open
OID
08cda7…5c9f:279
Players details

Inspect func

walk

type

walk is a tree's Iterate: what page reads.

Value

golf.walk

bpWalk

func(t *v0.BPTree) golf.walk
Open
OID
08cda7…5c9f:280
bpWalk details

Inspect func

page

func(t golf.walk, after string, limit int, fn func(...)) string

page walks up to limit entries of t after the key after, and returns the key to continue from, "" at the end.

Open
OID
08cda7…5c9f:281
page details

Inspect func

PeriodSeconds

untyped bigint

PeriodSeconds is how long one weather lasts.

Value

(300 <untyped> bigint)

Period

func() int64

Period is the weather period of the chain's current block time.

Open
OID
08cda7…5c9f:282
Period details

Inspect func

weatherOf

func(e *golf.entry, h *course.Simple, period int64) course.Forecast

weatherOf is the hole's weather in a period: seeded by its id, so each version of a slot has weather of its own.

Open
OID
08cda7…5c9f:284
weatherOf details

Inspect func

forecastJSON

func(head string, f course.Forecast) string

forecastJSON is a forecast as an object, head its first fields if any (as \`"version":1,\`). Zones' air and capped are not printed: only the wind has them, always.

Open
OID
08cda7…5c9f:285
forecastJSON details

Inspect func

Weather

func(hole string, period int64) string

Weather is a hole's weather in a period, as JSON: the zones a client draws and the chain plays under. Its "gas" is what a commit there spends before its first shot (decoding and forecast), counted against the commit's budget: a client adds it to its shots' estimate. A future period panics.

Open
OID
08cda7…5c9f:286
Weather details

Inspect func

notAhead

func(period int64)

notAhead refuses a period still to come. It is no secret (ForecastFor is pure): this only keeps reads to the weather a round can be played in.

Open
OID
08cda7…5c9f:287
notAhead details

Inspect func

notOver

func(period int64)

notOver refuses a round's weather two periods or more behind: a round left for later cannot be finished days on in the weather it picked.

Open
OID
08cda7…5c9f:288
notOver details

Inspect func

playablePeriod

func(period int64)

playablePeriod checks the period a round starts under: the current one, or the one just gone, for a round that ran over the turn of the period.

Open
OID
08cda7…5c9f:289
playablePeriod details

Inspect func
wearCells : untyped bigint =(128 <untyped> bigint)
maxData : untyped bigint =(32768 <untyped> bigint)
Publish : func(slot string, hexData string, note string) string Inspect
PublishMine : func(slug string, hexData string, note string) string Inspect
newestRow : func(a string) string Inspect
moveAuthor : func(a string, was string, now string) Inspect
linkish : func(s string) bool Inspect
isLower : func(c uint8) bool Inspect
isDigit : func(c uint8) bool Inspect
decodeData : func(hexData string) (*course.Simple, string, string) Inspect
nothingNew : func(old *golf.entry) string Inspect
dataEntry : func(alias string, n int, h *course.Simple, by .uverse.address, sum string, note string) *golf.entry Inspect
worlds : []struct{...} (len=5) Inspect
worldRank : func(w string) int Inspect
slotKey : func(world string, order int) string Inspect
slotKeyOf : func(slot string) (string, bool) Inspect
validSlug : func(s string) bool Inspect
HoleData : func(hole string) string Inspect
Current : func(alias string) string Inspect
Versions : func(alias string) string Inspect
firstVersion : func(now *golf.entry) int Inspect
BestOf : func(hole string, mode string, player .uverse.address) int Inspect
maxPower : untyped bigdec =(10.0 <untyped> bigdec)
maxShots : untyped bigint =(12 <untyped> bigint)
errShot : untyped string ="golf: a shot is an angle and a power between 0 and 10"
errStrokeLimit : untyped string ="golf: this round is over its stroke limit, Reset to play again"
errShotTooHeavy : untyped string ="golf: one shot on this hole could cost more than a transaction can replay"
errTooStormy : untyped string ="golf: in its dearest weather, a commit on this hole would leave too little room for a shot"
errUnknownHole : untyped string ="golf: unknown hole: "
entry : type =golf.entry
record : type =golf.record
bestOf : func(r *golf.round) string Inspect
errBest : untyped string ="golf: a best not as bestOf writes it: "
bestStrokes : func(v interface{...}) int Inspect
bestFields : func(v interface{...}) (int64, int64, string) Inspect
view : type =golf.view
before : func(t *v0.BPTree, k string) int Inspect
seeded : func() *v0.BPTree Inspect
newEntry : func(id string, name string, par int, world string, order float64) *golf.entry Inspect
draining : type =golf.draining
round : type =golf.round
assisted : untyped bigint =(0 <untyped> bigint)
pro : untyped bigint =(1 <untyped> bigint)
modes : untyped bigint =(2 <untyped> bigint)
modeOf : func(name string) int Inspect
modeNames : [2]string Inspect
modeTitles : [2]string Inspect
courseHoles : *v0.BPTree Inspect
community : *v0.BPTree Inspect
holeData : *v0.BPTree Inspect
slots : *v0.BPTree Inspect
aliases : *v0.BPTree Inspect
byAuthor : *v0.BPTree Inspect
hidden : *v0.Tree Inspect
archived : *v0.BPTree Inspect
rounds : *v0.BPTree Inspect
bests : *v0.BPTree Inspect
boards : *v0.BPTree Inspect
allTotals : *v0.BPTree Inspect
totals : [2]golf.view Inspect
allRanks : *v0.BPTree Inspect
ranks : [2]golf.view Inspect
idle : [2]golf.view Inspect
archiving : []string =<zero>
row : type =golf.row
topSize : untyped bigint =(10 <untyped> bigint)
named : func(player string) bool Inspect
nameOf : func(player string) string Inspect
nameish : func(n string) bool Inspect
find : func(id string) *golf.entry Inspect
current : func(alias string) string Inspect
mustHole : func(id string) *golf.entry Inspect
readHole : func(id string) *golf.entry Inspect
recentKey : func(height int64, what string) string Inspect
pad : func(n int, width int) string Inspect
rankKey : func(r *golf.row) string Inspect
maxCourse : untyped bigint =(9999 <untyped> bigint)
vsParBias : untyped bigint =(1000000 <untyped> bigint)
boardKey : func(v interface{...}, player string) string Inspect
boardStrokes : func(k string) int Inspect
setRow : func(m int, r *golf.row, holes int, strokes int, par int, at int64) Inspect
improve : func(m int, player string, par int, was int, best int) Inspect
retire : func(old *golf.entry, next string) Inspect
retireBatch : untyped bigint =(150 <untyped> bigint)
finishBatch : untyped bigint =(4 <untyped> bigint)
drainMax : untyped bigint =(400 <untyped> bigint)
drain : func(n int) Inspect
Drain : func(n int) int Inspect
counts : func(e *golf.entry, m int, player string, was int) bool Inspect
Launch : func(hole string, angle float64, power float64) string Inspect
aim : func(from physics.Vec2, cup physics.Vec2) (float64, float64) Inspect
PlayRound : func(hole string, shots string) string Inspect
PlayRoundAt : func(hole string, shots string, period int64) string Inspect
PlayRoundPro : func(hole string, shots string, period int64) string Inspect
playRound : func(e *golf.entry, player .uverse.address, shots string, period int64, mode int) string Inspect
otherMode : func(r *golf.round) string Inspect
shotList : func(shots string) []string Inspect
work : type =golf.work
workBudget : untyped bigint =(1400000000 <untyped> bigint)
workPerShot : untyped bigint =(10000000 <untyped> bigint)
workPerWall : untyped bigint =(150000 <untyped> bigint)
workPerPoint : untyped bigint =(1200000 <untyped> bigint)
workPerPiece : untyped bigint =(15000 <untyped> bigint)
workPerUnit : untyped bigint =(1000 <untyped> bigint)
workPerPulseWall : untyped bigint =(700000 <untyped> bigint)
workPerPulsePost : untyped bigint =(200000 <untyped> bigint)
decodeBase : untyped bigint =(6000000 <untyped> bigint)
decodePerByte : untyped bigint =(4000 <untyped> bigint)
fixedGas : func(e *golf.entry, fc course.Forecast) int64 Inspect
decodeGas : func(size int) int64 Inspect
maxShotGas : untyped bigint =(1300000000 <untyped> bigint)
minShotWork : untyped bigint =(800000 <untyped> bigint)
worstGas : func(h *course.Simple, size int) int64 Inspect
newWork : func(h *course.Simple, weather []physics.Zone) *golf.work Inspect
shotBound : func(walls int64) int64 Inspect
pieces : func(ws []physics.Wall, ps []physics.Post, zs []physics.Zone) int64 Inspect
Reset : func(hole string) Inspect
validShot : func(angle float64, power float64) (float64, float64) Inspect
resolve : func(shot physics.Shot, holed bool) (physics.Shot, bool) Inspect
back : func(h *course.Simple, from physics.Vec2, shot physics.Shot, holed bool) physics.Shot Inspect
stroke : func(e *golf.entry, h *course.Simple, r *golf.round, player .uverse.address, angle float64, power float64, tick int, weather []physics.Zone) (physics.Shot, bool) Inspect
seat : func(e *golf.entry, m int, p string, best interface{...}) Inspect
Claim : func() int Inspect
maxRoundStrokes : untyped bigint =(60 <untyped> bigint)
maxPath : untyped bigint =(512 <untyped> bigint)
q4 : func(x float64) float64 Inspect
maxTick : untyped bigint =(1023 <untyped> bigint)
parseShot : func(s string) (float64, float64, int) Inspect
clampTick : func(t string, shot string) int Inspect
roundOf : func(e *golf.entry, h *course.Simple, player .uverse.address) *golf.round Inspect
maxName : untyped bigint =(40 <untyped> bigint)
maxNote : untyped bigint =(140 <untyped> bigint)
cleanName : func(n string) string Inspect
cleanText : func(n string, max int) string Inspect
maxSkin : untyped bigint =(24 <untyped> bigint)
cleanSkin : func(s string) string Inspect
owner : .uverse.address =<gnolang.StringValue>
pending : .uverse.address =<zero>
self : string ="gno.land/r/nym-alexiscolin000/gnogolf/golf"
hub : string ="/r/nym-alexiscolin000/gnogolf/golf"
officialPrefix : string ="gno.land/r/nym-alexiscolin000/gnogolf/"
playURL : string ="https://gnogolf.xyz/"
successor : string =""
init.143 : func() Inspect
setUp : func(deployer .uverse.address, chainID string) Inspect
Owner : func() .uverse.address Inspect
Pending : func() .uverse.address Inspect
Successor : func() string Inspect
isOwner : func(caller .uverse.address) bool Inspect
Transfer : func(to .uverse.address) Inspect
Accept : func() Inspect
Renounce : func() Inspect
maxURL : untyped bigint =(100 <untyped> bigint)
maxPkgPath : untyped bigint =(100 <untyped> bigint)
SetPlayURL : func(url string) Inspect
validURL : func(u string) bool Inspect
SetSuccessor : func(pkgpath string) Inspect
Hide : func(slot string, hide bool) Inspect
publishing : bool =false
Publishing : func() bool Inspect
SetPublishing : func(open bool) Inspect
validPkgPath : func(p string) bool Inspect
EventHolePublished : untyped string ="HolePublished"
EventHoleRetired : untyped string ="HoleRetired"
EventShot : untyped string ="Shot"
EventHoled : untyped string ="Holed"
EventRoundReset : untyped string ="RoundReset"
EventOwnershipOffered : untyped string ="OwnershipOffered"
EventOwnershipOfferCancelled : untyped string ="OwnershipOfferCancelled"
EventOwnershipTransfer : untyped string ="OwnershipTransfer"
EventOwnershipRenounced : untyped string ="OwnershipRenounced"
EventPlayURLSet : untyped string ="PlayURLSet"
EventSuccessorSet : untyped string ="SuccessorSet"
EventHoleHidden : untyped string ="HoleHidden"
EventPublishingSet : untyped string ="PublishingSet"
wearRunes : untyped string =" :;x%"
wearLight : untyped bigint =(2 <untyped> bigint)
wearWorn : untyped bigint =(6 <untyped> bigint)
wearGroove : untyped bigint =(14 <untyped> bigint)
maxTunnels : untyped bigint =(9 <untyped> bigint)
markWall : rune =35
markPost : rune =48
markCup : rune =85
markTee : rune =42
Render : func(path string) string Inspect
noSuch : func(path string) string Inspect
lookup : func(id string) *golf.entry Inspect
cupName : func(w string) string Inspect
who : func(addr string) string Inspect
renderHub : func() string Inspect
moved : func() string Inspect
renderCup : func(world string) string Inspect
renderAuthor : func(a .uverse.address) string Inspect
bestCell : func(e *golf.entry, names map[string]string) string Inspect
weatherNote : func(f course.Forecast) string Inspect
noAdmin : func() string Inspect
source : func(e *golf.entry) string Inspect
md : func(label string, href string) string Inspect
vsPar : func(d int) string Inspect
flatRolls : untyped string ="On flat grass a power of 10 rolls about 40, a 5 about 15."
renderHole : func(e *golf.entry, h *course.Simple, focus .uverse.address) string Inspect
roundSummary : func(e *golf.entry, p .uverse.address, r *golf.round) string Inspect
shotsOf : func(shots string) string Inspect
renderData : func(e *golf.entry) string Inspect
board : func(e *golf.entry, h *course.Simple, f *physics.Field, mine *golf.round, now course.Forecast) string Inspect
drawZone : func(g [][]int32, z *physics.Zone, m int32) Inspect
boxCells : func(lo float64, hi float64, n int) (int, int) Inspect
cellAt : func(c float64, lo int, hi int) int Inspect
firstCell : func(lo int, hi int, ok func(...)) int Inspect
fillRow : func(row []int32, from int, to int, m int32) Inspect
span : func(lo float64, hi float64, n int) (int, int) Inspect
maxBoardWork : untyped bigint =(600000 <untyped> bigint)
boardWork : func(f *physics.Field, h *course.Simple) int Inspect
key : func(b string, walls string) string Inspect
legend : func(f *physics.Field) (string, string) Inspect
mark : func(m int32, def int32) int32 Inspect
wearRune : func(wear []int, x int, y int) int32 Inspect
trace : func(g [][]int32, s physics.Segment, c int32) Inspect
fill : func(g [][]int32, c physics.Circle, r int32) Inspect
put : func(g [][]int32, p physics.Vec2, c int32) Inspect
short : func(addr string) string Inspect
blankUnreachable : func(g [][]int32, wall [][]int32, f *physics.Field, seeds []physics.Vec2) Inspect
race : func(e *golf.entry, p string, label string) string Inspect
byName : func(addr string) string Inspect
count : func(n int, what string) string Inspect
HoleState : func(hole string) string Inspect
roundJSON : func(e *golf.entry, h *course.Simple, player string, r *golf.round) string Inspect
lastShot : func(h *course.Simple, r *golf.round, fc course.Forecast) physics.Shot Inspect
pathJSON : func(ps []physics.Vec2) string Inspect
airOf : func(s physics.Shot) string Inspect
Round : func(hole string, player .uverse.address) string Inspect
sep : func(i int) string Inspect
jnum : func(v float64) string Inspect
jexact : func(v physics.Vec2) string Inspect
versionJSON : untyped string ="\"version\":1"
jvec : func(v physics.Vec2) string Inspect
jstr : func(s string) string Inspect
Holes : func() string Inspect
holeRow : func(e *golf.entry) string Inspect
Community : func(after string, limit int) string Inspect
perAuthor : untyped bigint =(3 <untyped> bigint)
listed : func() []*golf.entry Inspect
authorRows : untyped string =":"
maxArchived : untyped bigint =(20 <untyped> bigint)
minCommunity : untyped bigint =(20 <untyped> bigint)
SimulateFrom : func(hole string, ballX float64, ballY float64, shot string, stroke int, period int64) string Inspect
validStroke : func(stroke int) Inspect
onBoard : func(h *course.Simple, x float64, y float64) physics.Vec2 Inspect
shotJSON : func(shot physics.Shot) string Inspect
SimulateRound : func(hole string, shots string) string Inspect
SimulateRoundAt : func(hole string, shots string, period int64) string Inspect
SimulateRoundIn : func(hole string, shots string, period int64) string Inspect
SimulateCommit : func(hole string, ballX float64, ballY float64, stroke int, shots string, period int64) string Inspect
simulateRound : func(hole string, from *physics.Vec2, strokes int, shots string, period int64) string Inspect
boardJSON : func(h *course.Simple) string Inspect
wallsJSON : func(ws []physics.Wall) string Inspect
postsJSON : func(ps []physics.Post) string Inspect
zonesJSON : func(zs []physics.Zone, flags bool) string Inspect
timingJSON : func(every int, on int, phase int) string Inspect
polyJSON : func(z *physics.Zone) string Inspect
Extras : func(hole string, stroke int) string Inspect
Leaderboard : func(mode string) string Inspect
eachRanked : func(m int, fn func(...)) Inspect
maxWalked : untyped bigint =(40 <untyped> bigint)
strokesRow : func(p string, name string, strokes int) string Inspect
standingRow : func(p string, name string, r *golf.row) string Inspect
standingFields : func(r *golf.row) string Inspect
nameField : func(name string) string Inspect
Rank : func(mode string, player .uverse.address) string Inspect
CourseLeaderboard : func(mode string, offset int, limit int) string Inspect
Ghost : func(hole string, mode string, player .uverse.address) string Inspect
HoleRank : func(hole string, mode string, player .uverse.address) string Inspect
maxListed : untyped bigint =(120 <untyped> bigint)
HoleLeaderboard : func(hole string, mode string, offset int, limit int) string Inspect
pageMax : untyped bigint =(100 <untyped> bigint)
clampLimit : func(n int) int Inspect
maxFriends : untyped bigint =(50 <untyped> bigint)
friends : func(list string) []string Inspect
Bests : func(hole string, mode string, players string) string Inspect
Standings : func(mode string, players string) string Inspect
Records : func(hole string, mode string, after string, limit int) string Inspect
Players : func(mode string, after string, limit int) string Inspect
walk : type =golf.walk
bpWalk : func(t *v0.BPTree) golf.walk Inspect
page : func(t golf.walk, after string, limit int, fn func(...)) string Inspect
PeriodSeconds : untyped bigint =(300 <untyped> bigint)
Period : func() int64 Inspect
weatherOf : func(e *golf.entry, h *course.Simple, period int64) course.Forecast Inspect
forecastJSON : func(head string, f course.Forecast) string Inspect
Weather : func(hole string, period int64) string Inspect
notAhead : func(period int64) Inspect
notOver : func(period int64) Inspect
playablePeriod : func(period int64) Inspect