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

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v0 state

Back to all declarations

emit

func(typ string, attrs []string)

Events emitted by the realm (type, attribute keys): GameCreated id creator char seats maxTurns timeoutMinutes hex facing stake PlayerJoined id player seat char hex facing PlanCommitted id turn player seat AllCommitted id turn (every character in the fight committed: the reveals start) PlanRevealed id turn seat by (by: who sent the reveal, the player or the opener of its timelocked plan) PlanUnopened id turn seat reason (a RevealMany skips a seat whose salt and plan do not match its commit or whose plan is not valid) PlanPassed id turn seat (a player with no time points to play is passed automatically) PlanMissed id turn seat missed (a claimed timeout passes the turn of a player whose plan is not in, no commit or never revealed; Out at the MaxMissed-th in a row) PlayerSurrendered id turn player seat TurnResolved id turn rev seed VictoryPoints id seat player reason points (one per award at the end of a turn or of the showdown, rule 15; points < 0 for a loss) GameEnded id reason winner PotPaid id seat player amount (ugnot; one per winner, a draw splitting the pot, stakes.gno) StakeRefunded id seat player amount (a showdown cancelled, or ended with everyone out of time, gives the stakes back) HouseWithdrawn to amount AdminChanged admin PlanDue id turn turns to char vs left (a turn started: one per player with a plan to send; char its character, vs the others', left the time the turn gives; notify.gno) RevealDue id turn turns to char vs (the reveals started: one per player whose committed plan is not revealed) ShowdownOver id to char vs outcome (the game ended: one per player, "you won", "you lost", "a draw"; a cancelled game, to the players who had joined) They land in transaction results; clients still poll Game.Rev to sync. PlanDue, RevealDue and ShowdownOver name their recipient, for the browser notifications (notify.gno).

Open
OID
0e9198…ecee:3
emit details

Inspect func

realmPath

untyped string

Value

"gno.land/r/g1th0masp67zfs9lg6d34qhghldhg6kjcqjuv7c2/gnoslinger/v0"

DefaultTimeout

time.Duration

Value

<zero>

MinTimeout

time.Duration

Value

<zero>

MaxTimeout

time.Duration

Value

<zero>

MinMaxTurns

untyped bigint

Value

(10 <untyped> bigint)

MaxMaxTurns

untyped bigint

Value

(30 <untyped> bigint)

MaxMissed

untyped bigint

Value

(3 <untyped> bigint)

RevealGrace

time.Duration

Value

<zero>

LockDelay

time.Duration

Value

<zero>

MaxLocked

untyped bigint

Value

(1024 <untyped> bigint)

MaxSalt

untyped bigint

Value

(64 <untyped> bigint)

DrandGenesis

untyped bigint

Value

(1692803367 <untyped> bigint)

DrandPeriod

untyped bigint

Value

(3 <untyped> bigint)

Phase

type

Phase is where a game stands.

Value

v0.Phase

PhaseWaiting

v0.Phase

Value

<zero>

PhasePlanning

v0.Phase

Value

<zero>

PhaseFinished

v0.Phase

Value

<zero>

PhaseRevealing

v0.Phase

Value

<zero>

Player

type

Player is a seat: the address that controls it (empty while nobody took it) and its character token.

Value

v0.Player

TurnResult

type

TurnResult is the outcome of one resolved turn, kept so the client can replay it: the state the turn started from, the plans (one per seat), and what happened. Seed lets anyone re-run the resolution; Cards is the trace of the result cards drawn from the deck it shuffles, in order. The start snapshot, the weapons on the ground at the start, the cards and the events are kept in the engine's compact text encodings: as structs they cost a hundred times more storage (see engine/encode.gno). With the ground, a turn is shown from its own record, without the turns before it.

Value

v0.TurnResult

newTurnResult

func(turn int, start []v0.Character, ground string, plans []string, seed string, cards []int, evs []v0.Event) *v0.TurnResult
Open
OID
0e9198…ecee:5
newTurnResult details

Inspect func

Sealed

type

Sealed is a seat's sealed plan for the turn in progress, cleared by its reveal.

Value

v0.Sealed

Game

type

Game is one showdown. Players, Commits, Plans, Salts, Revealed, Missed and VP have one entry per seat, the seats filling up in the order the players join.

Value

v0.Game

gameSeq

v0.ID

Value

<zero>

byPlayer

*v0.Tree

// address -> \[]string game ids, newest first

Open
OID
0e9198…ecee:12
byPlayer details

Inspect pointer

openGames

*v0.Tree

// id -> \*Game while a seat is free

Open
OID
0e9198…ecee:15
openGames details

Inspect pointer

PlanHash

func(id string, turn int, seat int, salt string, plan string) string

PlanHash is what a seat commits: the sha256, in hex, of its salt and plan for that game, turn and seat ("gnoslinger|id|turn|seat|salt|plan").

Open
OID
0e9198…ecee:18
PlanHash details

Inspect func

save

func(g *v0.Game)

save records a change: bumps the revision and the activity clock.

Open
OID
0e9198…ecee:19
save details

Inspect func

index

func(addr .uverse.address, id string)
Open
OID
0e9198…ecee:20
index details

Inspect func

unindex

func(addr .uverse.address, id string)

unindex removes id from addr's games, and addr from byPlayer once it has none left.

Open
OID
0e9198…ecee:21
unindex details

Inspect func

listLimit

untyped bigint

Value

(50 <untyped> bigint)

liveScan

untyped bigint

liveScan is how many of the newest games GamesJSON looks through for the ones being played: what the view costs stays bounded however many games there are.

Value

(200 <untyped> bigint)

endedLimit

untyped bigint

endedLimit is how many of the last finished games GamesJSON lists.

Value

(10 <untyped> bigint)

GameJSON

func(id string) string

GameJSON is the full view of a game: {"id","rev","phase","turn","maxTurns","timeout" (seconds),"board", "players":[{"addr" ("" for a seat nobody took yet),"name","char","hex" ("" until the seat set up),"facing","down","delay","status","committed","revealed","locked" (its timelocked plan, "" once revealed),"missed" (turns in a row it let time out),"playedFoot","playedRun","ranLastTurn", "aim","aimAt" (the seat the AIM markers follow, -1 when they sit on a hex or there is no aim),"aimHex" (the hex they sit on, "" when they follow a seat),"endurance","serious","gunArm","otherArm","leg", "guns":[{"id","type","name","location","cocked","shells","capacity","jammed","exploded"}]}] (one entry per seat, 2 to 4), "ground":[{"id" (ground id, "g<id>" in a plan),"hex","guns":[{..}]}], "winner","vp":[victory points per seat],"awards":[{"p","reason","points"}] (rule 15, once a played game ends), "stake" (ugnot each player puts in, 0 for a free showdown),"pot" (the stakes paid so far),"payouts":[ugnot each seat got, [] until paid],"houseCut" (stakes.gno),"endReason", "createdAt","updatedAt","timeoutAt" (when the turn in progress can be claimed, 0 unless planning or revealing), "commitUntil" (the turn's deadline),"revealUntil" (when unrevealed seats can be claimed out),"lockRound" (the drand round the plans are timelocked to) (0 unless planning or revealing), "lastTurn":null|{"turn","seed","cards":[result card numbers drawn, in order],"plans":[..], "events":[{"seg","p","kind","action","from","to","facing","down","n","delay","reason","card","result","endurance","target","hit","range","gun","gunId","step","chart","status"}], "start":[{"hex","facing","down","delay","status","aim","aimAt","aimHex","endurance","serious","gunArm","otherArm","leg","guns":[..]},..], "ground":[the weapons on the ground at the turn's start, as "ground" above]}} Times are unix seconds; winner, events\[].p and events\[].target are seat indexes, -1 for none. The plans of the turn in progress are hidden until revealed: only their commits show, as flags and timelocked plans.

Open
OID
0e9198…ecee:22
GameJSON details

Inspect func

PlanJSON

func(id string, addr string) string

PlanJSON is where an address's plan for the turn in progress stands; the plan itself shows once revealed: {"id","turn","seat" (-1 when addr is not a player),"committed","revealed","plan" ("" until revealed)}

Open
OID
0e9198…ecee:24
PlanJSON details

Inspect func

TurnJSON

func(id string, turn int) string

TurnJSON is one resolved turn of a game (from 1), the turn result as json/game writes its last one: what replays read, a turn per query (the "json/history/{id}/{turn}" view), so that what a query costs does not grow with the game. Each turn is self-contained (its start and ground).

Open
OID
0e9198…ecee:25
TurnJSON details

Inspect func

HistoryJSON

func(id string) string

HistoryJSON is every resolved turn of a game, oldest first, for tests and tools (the tutorial's showdown, make gen-tutorial); no view serves it: a long game's history may cost more than a query can. {"id","turn","phase","players":[{"addr","char"}],"turns":[turn result...]}

Open
OID
0e9198…ecee:26
HistoryJSON details

Inspect func

writePlayer

func(b *strings.Builder, g *v0.Game, i int)
Open
OID
0e9198…ecee:27
writePlayer details

Inspect func

writeWounds

func(b *strings.Builder, c v0.Character)

writeWounds writes the aim and wound members of a character.

Open
OID
0e9198…ecee:28
writeWounds details

Inspect func

writeTimeoutAt

func(b *strings.Builder, g *v0.Game)

writeTimeoutAt writes the ,"timeoutAt" member: when the turn in progress can be claimed, 0 unless the game is planning or revealing.

Open
OID
0e9198…ecee:29
writeTimeoutAt details

Inspect func

writeGround

func(b *strings.Builder, ground []v0.GroundGun)

writeGround writes the ,"ground":\[...] member: the weapons lying in hexes.

Open
OID
0e9198…ecee:30
writeGround details

Inspect func

writeGuns

func(b *strings.Builder, guns v0.Guns)

writeGuns writes the ,"guns":\[...] member of a character.

Open
OID
0e9198…ecee:31
writeGuns details

Inspect func

writeTurnResult

func(b *strings.Builder, r *v0.TurnResult)
Open
OID
0e9198…ecee:32
writeTurnResult details

Inspect func

writeEvent

func(b *strings.Builder, e v0.Event)
Open
OID
0e9198…ecee:33
writeEvent details

Inspect func

GamesJSON

func(addr string) string

GamesJSON lists, for an address, the games with a free seat, the games being played (live: planning or revealing, for anyone to watch), the last endedLimit games finished (ended, for anyone to replay) and the games it plays or played, newest first (at most 50 each), with the address's registered name ("" if none). live and ended are found among the liveScan newest games, a running game being recent: a turn times out within days. {"name","open":[summary...],"live":[summary...],"ended":[summary...],"mine":[summary...]} summary = {"id","rev","phase","turn","maxTurns","timeout","winner","endReason","vp","stake","pot","payouts","houseCut","createdAt","updatedAt","timeoutAt","lockRound","players":[{"addr","name","char","status","committed","revealed"}]} lockRound (0 unless planning or revealing) tells the lobby when the timelocked plans of a seat committed and not revealed can be opened. players has one entry per seat, "addr" "" for a seat nobody took yet.

Open
OID
0e9198…ecee:34
GamesJSON details

Inspect func

writeSummary

func(b *strings.Builder, g *v0.Game)
Open
OID
0e9198…ecee:35
writeSummary details

Inspect func

writeVP

func(b *strings.Builder, g *v0.Game)

writeVP writes the victory points of each seat.

Open
OID
0e9198…ecee:36
writeVP details

Inspect func

writeStakes

func(b *strings.Builder, g *v0.Game)

writeStakes writes the stake, the pot and, once paid, what each seat got.

Open
OID
0e9198…ecee:37
writeStakes details

Inspect func

quote

func(s string) string

quote encodes s as a JSON string.

Open
OID
0e9198…ecee:38
quote details

Inspect func

GameRev

func(id string) int

GameRev is the cheapest way to poll a game for changes.

Open
OID
0e9198…ecee:39
GameRev details

Inspect func

CreateGame

func(seats int, maxTurns int, timeoutMinutes int, startHex string, facing int) string

CreateGame opens a showdown of seats players (engine.MinPlayers to engine.MaxPlayers) with the caller in seat 0, playing the showdown's first character (engine.Setups: the marshal), standing in startHex, one of the hexes assigned to that character, facing f (0=N 1=NE 2=SE 3=S 4=SW 5=NW); it returns the game id. The other seats take the next characters in the order the players join. maxTurns is the game length, from MinMaxTurns to MaxMaxTurns; timeoutMinutes is the time each turn gives the players, past which anyone may claim it with ClaimTimeout, 0 meaning DefaultTimeout (2 days). The game stays open until its seats fill up or its creator cancels it: the turn clock starts with the last join. The ugnot sent with the call are the showdown's stake, which every joiner must send too; none, a free showdown (stakes.gno).

Open
OID
0e9198…ecee:40
CreateGame details

Inspect func

JoinGame

func(id string, startHex string, facing int)

JoinGame seats the caller in the first free seat of a waiting game, playing that seat's character (the kid, then the reb, then the yankee), standing in startHex, one of that character's hexes, facing f; the game starts collecting the commits of turn 1 once its last seat is taken. The call must send the showdown's stake, no more, no less.

Open
OID
0e9198…ecee:42
JoinGame details

Inspect func

assertSetUp

func(charKey string, startHex string, facing int)

assertSetUp refuses a character that is not in the showdown, a hex it may not set up in, or no such facing.

Open
OID
0e9198…ecee:43
assertSetUp details

Inspect func

CancelGame

func(id string)

CancelGame withdraws a game whose seats are not all taken yet. Creator only. The game is deleted, not kept as finished, so the creator gets back the storage deposit CreateGame paid; the players who had joined are unindexed with it, and every stake paid goes back.

Open
OID
0e9198…ecee:44
CancelGame details

Inspect func

notifTriggers

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

notifTriggers are the realm's triggers, by name. Title and body are templates, {key} standing for the event's attribute: every event names the player's character (char) and the others' (vs), and the game; the link opens the game in the client (game/route.ts).

Open
OID
0e9198…ecee:46
notifTriggers details (len=3)

+3 more Inspect slice

notif

*v1.Handle

notif is the realm's handle on its triggers in the registry, kept so that DeclareTriggers can set them again: a changed title, body or link keeps the trigger's id, and so the browsers opted in.

Open
OID
0a0c35…50b5:73
notif details

Inspect pointer

DeclareTriggers

func()

DeclareTriggers sets the realm's triggers in the gnotif registry. Admin only, and the first call has what the registry's Open requires: the namespace owner's own key (not a session), in a call sent straight to the realm; so the deployer sends it once the realm is deployed (on gnodev, the make notif script sends it as test1). The triggers keep their ids from one call to the next. Every call makes the registry emit each trigger again (TriggerDeclared), which is what a gnotif server reads them from: the registry emits nothing for a trigger set as it already is, so each is first set with a nudged body, then as it should be. That is for gnodev, whose reload puts the earlier call in the genesis, where no indexer serves its events: the script calls again after each reload and the triggers reach gnotifd anew.

Open
OID
0e9198…ecee:54
DeclareTriggers details

Inspect func

charName

func(key string) string

charName spells a character key as the client does: "the\_kid" is "The Kid".

Open
OID
0e9198…ecee:56
charName details

Inspect func

formatTimeout

func(d time.Duration) string

formatTimeout spells the time a turn gives: whole days, else whole hours, else minutes.

Open
OID
0e9198…ecee:57
formatTimeout details

Inspect func

Commit

func(id string, turn int, hash string, locked string) int

Commit seals the caller's plan for the given turn, the one in progress, and returns the game revision (a commit meant for another turn, say one still on its way when time was called, is refused: its hash, which covers the turn, could never be revealed in this one, and it would take the seat's commit). hash is PlanHash of a salt and the plan, which a Reveal shows once every character still in the fight committed; locked is the salt and plan timelocked to the turn's LockRound (at most MaxLocked bytes, required: encrypting needs no drand node), which anyone can open and reveal from then if the player does not. When this commit is the last one the turn waits for, the game moves on to the reveals.

Open
OID
0e9198…ecee:58
Commit details

Inspect func

Reveal

func(id string, turn int, seat int, salt string, plan string) int

Reveal puts a seat's salt and plan for the given turn on chain and returns the game revision. Anyone may send it while the game collects the reveals: the salt and plan must match the seat's commit (PlanHash). The last seat to commit may also reveal straight away, without committing: the others' plans are already fixed by their hashes, so its plan in clear helps nobody; that is only accepted from the seat itself, before the deadline, once every other character still in the fight committed (a refused transaction still shows its plan). The plan is a comma-separated list of "\<card>\<f|b>\[:\<choice>]" entries, e.g. "1f:ahead\_left,2f:ahead,3f"; an empty string passes. The reveal that completes the turn resolves it in this same transaction and the next turn starts.

Open
OID
0e9198…ecee:60
Reveal details

Inspect func

RevealMany

func(id string, turn int, seats string, salts string, plans string) int

RevealMany reveals several seats of the given turn in one transaction, as Reveal does each, in the order given: what an opener of the timelocked plans sends. seats, salts and plans are lists separated by ";", of the same length (a plan string never holds a ";", an empty plan is an empty field). A seat already revealed is skipped (its player's own reveal landed first), and so is one whose salt and plan do not match its commit or whose plan is not valid (event PlanUnopened): the opener cannot check that before opening, and one bad timelocked plan must not keep the others back; that seat stays unrevealed, for the claim.

Open
OID
0e9198…ecee:61
RevealMany details

Inspect func

revealSeat

func(g *v0.Game, seat int, salt string, plan string, by .uverse.address)

revealSeat checks a committed seat's salt and plan against its hash and stores them, clearing the commit.

Open
OID
0e9198…ecee:62
revealSeat details

Inspect func

checkReveal

func(g *v0.Game, seat int, salt string, plan string) string

checkReveal tells why a committed seat's salt and plan cannot be revealed, "" if they can.

Open
OID
0e9198…ecee:63
checkReveal details

Inspect func

checkPlan

func(g *v0.Game, seat int, salt string, plan string) (pl v0.Plan, why string)

checkPlan parses and validates a seat's salt and plan; why is "" when they are fine.

Open
OID
0e9198…ecee:64
checkPlan details

Inspect func

storePlan

func(g *v0.Game, seat int, salt string, plan string, by .uverse.address)

storePlan validates a seat's plan and records it as revealed, clearing its commit (whose storage deposit goes back to the caller).

Open
OID
0e9198…ecee:65
storePlan details

Inspect func

isHex

func(s string, min int, max int) bool

isHex reports whether s is min to max lowercase hex characters.

Open
OID
0e9198…ecee:66
isHex details

Inspect func

progress

func(g *v0.Game)

progress moves the turn on as far as it can: it passes the players who cannot play anything (a carried delay of 5 or more leaves no time points, rule 7.3: there is nothing to wait for from them), goes on to the reveals once every character in the fight committed, and resolves the turn once every plan is in; when nobody is left to wait for in the next turn either, that turn resolves at once, and so on.

Open
OID
0e9198…ecee:67
progress details

Inspect func

resolveTurn

func(g *v0.Game) string

resolveTurn plays the seats' plans with the result deck shuffled from this turn's seed, stores the result and advances the game. It returns the seed in hex.

Open
OID
0e9198…ecee:68
resolveTurn details

Inspect func

groundExists

func(st v0.State, id int) bool

groundExists reports whether a gun with that ground id lies somewhere on the board; whether it is in the character's hex is checked when the action executes, since the character may walk to it first.

Open
OID
0e9198…ecee:69
groundExists details

Inspect func

Surrender

func(id string)

Surrender gives up the showdown (rule 15.4: at the start of a turn, that is while the plans are committed; once they are revealed, surrendering after reading the others' would be the abort the hidden plans remove). The character is Out: nobody can shoot it and it plays no more. With one character left in the fight the game ends and is scored, the surrendered losing the "Surrender" points and, an enemy holding the field, being captured; with more, the showdown goes on without it (its commit is dropped), and goes on to the reveals if the others' plans are committed.

Open
OID
0e9198…ecee:70
Surrender details

Inspect func

ClaimTimeout

func(id string)

ClaimTimeout ends the wait of a turn past its deadline. Anyone may call it. A game waiting for players has no timeout (its creator may cancel it). While the plans are committed, past the deadline: each player who did not commit misses the turn: it is passed for them, unless that makes MaxMissed in a row, which puts the character out of the fight (out of time counts as surrendering); the game then goes on to the reveals, and with nobody's plan in, the turn resolves empty. A showdown nobody plays any more so ends after MaxMissed claims, everyone out of the fight (its stakes given back, stakes.gno). While they are revealed, RevealGrace past the deadline (the timelocked plans had time to be opened, which is how a vanished player's plan normally comes in): every character whose plan is still not in misses the turn the same way. The realm cannot tell a copy nobody could open from one nobody tried to open, so it does not punish more than a missed turn. With one character left the game ends and is scored, with more the turn resolves with the plans in and the showdown goes on.

Open
OID
0e9198…ecee:71
ClaimTimeout details

Inspect func

missTurn

func(g *v0.Game, p int)

missTurn passes the turn for a seat whose plan is not in at the claim (its commit, if any, dropped), or puts the character out of the fight at its MaxMissed-th miss in a row; only a revealed plan resets the count.

Open
OID
0e9198…ecee:72
missTurn details

Inspect func

recentLimit

untyped bigint

Value

(20 <untyped> bigint)

Render

func(path string) string

Render serves the gnoweb pages ("", "help", "game/{id}") and the raw JSON views the web client reads ("json/game/{id}", "json/games/{addr}", "json/history/{id}/{turn}", "json/plan/{id}/{addr}"); the players' profiles and ranking are the profiles realm's (gno.land/r/g1th0masp67zfs9lg6d34qhghldhg6kjcqjuv7c2/gnoslinger/profiles/v0).

Open
OID
0e9198…ecee:79
Render details

Inspect func

renderHome

func(res *v0.ResponseWriter, *v0.Request)
Open
OID
0e9198…ecee:81
renderHome details

Inspect func

renderGame

func(res *v0.ResponseWriter, req *v0.Request)
Open
OID
0e9198…ecee:82
renderGame details

Inspect func

renderHelp

func(res *v0.ResponseWriter, *v0.Request)
Open
OID
0e9198…ecee:83
renderHelp details

Inspect func

cancelReason

func(e v0.Event) string

cancelReason is the reason of a cancel event as the log shows it: the reason code, except a target out of sight, spelled out with the obstacle in the way.

Open
OID
0e9198…ecee:84
cancelReason details

Inspect func

noSight

func(e v0.Event) string

noSight words a no\_los reason: the event's To names the obstacle in the way.

Open
OID
0e9198…ecee:85
noSight details

Inspect func

sideLabel

func(s v0.Side) string
Open
OID
0e9198…ecee:86
sideLabel details

Inspect func

describeEvent

func(g *v0.Game, e v0.Event) string
Open
OID
0e9198…ecee:87
describeEvent details

Inspect func

seatLabel

func(g *v0.Game, i int) string
Open
OID
0e9198…ecee:88
seatLabel details

Inspect func

seatLabels

func(g *v0.Game) string

seatLabels names every seat, "marshal vs the\_kid vs ?".

Open
OID
0e9198…ecee:89
seatLabels details

Inspect func

gnot

func(ugnot int64) string

gnot words an amount of ugnot in GNOT: "5 GNOT", "9.5 GNOT".

Open
OID
0e9198…ecee:92
gnot details

Inspect func

stakeLabel

func(g *v0.Game) string

stakeLabel words a showdown's stake: "free", or "5 GNOT each".

Open
OID
0e9198…ecee:93
stakeLabel details

Inspect func

setupList

func() string

setupList words where each character sets up: "the marshal in A-G5 to A-G9, ...".

Open
OID
0e9198…ecee:94
setupList details

Inspect func

phaseLabel

func(g *v0.Game) string
Open
OID
0e9198…ecee:95
phaseLabel details

Inspect func

addr

func(a .uverse.address) string

addr shows an address by its registered name when it has one.

Open
OID
0e9198…ecee:96
addr details

Inspect func

Denom

untyped string

Value

"ugnot"

HouseCutPercent

untyped bigint

Value

(5 <untyped> bigint)

house

int64

Value

0

admin

.uverse.address

Value

<gnolang.StringValue>

sentStake

func() int64

sentStake returns the ugnot sent with the call, 0 for none. Coins can only come straight from a user's call: a realm in between could have spent the send it reports (unsafe.OriginSend is the whole message's).

Open
OID
0e9198…ecee:102
sentStake details

Inspect func

assertNoSend

func()

assertNoSend refuses coins sent with a call that takes none: they would sit in the realm's balance with no showdown to pay them out.

Open
OID
0e9198…ecee:104
assertNoSend details

Inspect func

pay

func(to .uverse.address, amount int64)

pay sends amount ugnot from the realm to addr.

Open
OID
0e9198…ecee:105
pay details

Inspect func

WithdrawHouse

func(to .uverse.address, amount int64)

WithdrawHouse sends amount ugnot of the house's funds to an address. Admin only.

Open
OID
0e9198…ecee:106
WithdrawHouse details

Inspect func

SetAdmin

func(addr .uverse.address)

SetAdmin hands the house's funds over to another admin. Admin only.

Open
OID
0e9198…ecee:107
SetAdmin details

Inspect func

House

func() int64

House is the ugnot the house holds for events.

Open
OID
0e9198…ecee:109
House details

Inspect func
emit : func(typ string, attrs []string) Inspect
realmPath : untyped string ="gno.land/r/g1th0masp67zfs9lg6d34qhghldhg6kjcqjuv7c2/gnoslinger/v0"
DefaultTimeout : time.Duration =<zero>
MinTimeout : time.Duration =<zero>
MaxTimeout : time.Duration =<zero>
MinMaxTurns : untyped bigint =(10 <untyped> bigint)
MaxMaxTurns : untyped bigint =(30 <untyped> bigint)
MaxMissed : untyped bigint =(3 <untyped> bigint)
RevealGrace : time.Duration =<zero>
LockDelay : time.Duration =<zero>
MaxLocked : untyped bigint =(1024 <untyped> bigint)
MaxSalt : untyped bigint =(64 <untyped> bigint)
DrandGenesis : untyped bigint =(1692803367 <untyped> bigint)
DrandPeriod : untyped bigint =(3 <untyped> bigint)
Phase : type =v0.Phase
PhaseWaiting : v0.Phase =<zero>
PhasePlanning : v0.Phase =<zero>
PhaseFinished : v0.Phase =<zero>
PhaseRevealing : v0.Phase =<zero>
Player : type =v0.Player
TurnResult : type =v0.TurnResult
newTurnResult : func(turn int, start []v0.Character, ground string, plans []string, seed string, cards []int, evs []v0.Event) *v0.TurnResult Inspect
Sealed : type =v0.Sealed
Game : type =v0.Game
games : *v0.Tree Inspect
gameSeq : v0.ID =<zero>
byPlayer : *v0.Tree Inspect
openGames : *v0.Tree Inspect
getGame : func(id string) *v0.Game Inspect
PlanHash : func(id string, turn int, seat int, salt string, plan string) string Inspect
save : func(g *v0.Game) Inspect
index : func(addr .uverse.address, id string) Inspect
unindex : func(addr .uverse.address, id string) Inspect
listLimit : untyped bigint =(50 <untyped> bigint)
liveScan : untyped bigint =(200 <untyped> bigint)
endedLimit : untyped bigint =(10 <untyped> bigint)
GameJSON : func(id string) string Inspect
PlanJSON : func(id string, addr string) string Inspect
TurnJSON : func(id string, turn int) string Inspect
HistoryJSON : func(id string) string Inspect
writePlayer : func(b *strings.Builder, g *v0.Game, i int) Inspect
writeWounds : func(b *strings.Builder, c v0.Character) Inspect
writeTimeoutAt : func(b *strings.Builder, g *v0.Game) Inspect
writeGround : func(b *strings.Builder, ground []v0.GroundGun) Inspect
writeGuns : func(b *strings.Builder, guns v0.Guns) Inspect
writeTurnResult : func(b *strings.Builder, r *v0.TurnResult) Inspect
writeEvent : func(b *strings.Builder, e v0.Event) Inspect
GamesJSON : func(addr string) string Inspect
writeSummary : func(b *strings.Builder, g *v0.Game) Inspect
writeVP : func(b *strings.Builder, g *v0.Game) Inspect
writeStakes : func(b *strings.Builder, g *v0.Game) Inspect
quote : func(s string) string Inspect
GameRev : func(id string) int Inspect
CreateGame : func(seats int, maxTurns int, timeoutMinutes int, startHex string, facing int) string Inspect
JoinGame : func(id string, startHex string, facing int) Inspect
assertSetUp : func(charKey string, startHex string, facing int) Inspect
CancelGame : func(id string) Inspect
notifTriggers : []struct{...} (len=3) Inspect
notif : *v1.Handle Inspect
DeclareTriggers : func() Inspect
charName : func(key string) string Inspect
formatTimeout : func(d time.Duration) string Inspect
Commit : func(id string, turn int, hash string, locked string) int Inspect
Reveal : func(id string, turn int, seat int, salt string, plan string) int Inspect
RevealMany : func(id string, turn int, seats string, salts string, plans string) int Inspect
revealSeat : func(g *v0.Game, seat int, salt string, plan string, by .uverse.address) Inspect
checkReveal : func(g *v0.Game, seat int, salt string, plan string) string Inspect
checkPlan : func(g *v0.Game, seat int, salt string, plan string) (pl v0.Plan, why string) Inspect
storePlan : func(g *v0.Game, seat int, salt string, plan string, by .uverse.address) Inspect
isHex : func(s string, min int, max int) bool Inspect
progress : func(g *v0.Game) Inspect
resolveTurn : func(g *v0.Game) string Inspect
groundExists : func(st v0.State, id int) bool Inspect
Surrender : func(id string) Inspect
ClaimTimeout : func(id string) Inspect
missTurn : func(g *v0.Game, p int) Inspect
recentLimit : untyped bigint =(20 <untyped> bigint)
router : *v0.Router Inspect
init.78 : func() Inspect
Render : func(path string) string Inspect
renderHome : func(res *v0.ResponseWriter, *v0.Request) Inspect
renderGame : func(res *v0.ResponseWriter, req *v0.Request) Inspect
renderHelp : func(res *v0.ResponseWriter, *v0.Request) Inspect
cancelReason : func(e v0.Event) string Inspect
noSight : func(e v0.Event) string Inspect
sideLabel : func(s v0.Side) string Inspect
describeEvent : func(g *v0.Game, e v0.Event) string Inspect
seatLabel : func(g *v0.Game, i int) string Inspect
seatLabels : func(g *v0.Game) string Inspect
gnot : func(ugnot int64) string Inspect
stakeLabel : func(g *v0.Game) string Inspect
setupList : func() string Inspect
phaseLabel : func(g *v0.Game) string Inspect
addr : func(a .uverse.address) string Inspect
when : func(t time.Time) string Inspect
yesNo : func(b bool) string Inspect
orPass : func(plan string) string Inspect
Denom : untyped string ="ugnot"
HouseCutPercent : untyped bigint =(5 <untyped> bigint)
house : int64 =0
admin : .uverse.address =<gnolang.StringValue>
sentStake : func() int64 Inspect
assertNoSend : func() Inspect
pay : func(to .uverse.address, amount int64) Inspect
WithdrawHouse : func(to .uverse.address, amount int64) Inspect
SetAdmin : func(addr .uverse.address) Inspect
assertAdmin : func() Inspect
House : func() int64 Inspect
Admin : func() .uverse.address Inspect