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

v0 state

Back to all declarations

Period

int64

The economy. Ore is a bare integer: there is no token here, and nothing leaves the realm.

Value

60

CapPeriods

int64

The economy. Ore is a bare integer: there is no token here, and nothing leaves the realm.

Value

120

UpgradeBase

int64

The economy. Ore is a bare integer: there is no token here, and nothing leaves the realm.

Value

10

PrestigeAt

int64

The economy. Ore is a bare integer: there is no token here, and nothing leaves the realm.

Value

10

MaxLevel

int64

The economy. Ore is a bare integer: there is no token here, and nothing leaves the realm.

Value

1000

MaxPrestige

int64

The economy. Ore is a bare integer: there is no token here, and nothing leaves the realm.

Value

100

mine

type

mine is one player's state. pending and anchor are the accrual pair: what was in the mine, and as of when. Everything else is bookkeeping.

Value

v0.mine

mines

v0.Tree

// address string -> \*mine

Open
OID
0c1bd7…7ded:7
mines details

Inspect ref

now

func() int64

now is the chain's own clock in unix seconds. time.Now() in a realm returns the block timestamp, so it is consensus-deterministic rather than wall time.

Open
OID
0c1bd7…7ded:8
now details

Inspect func

rate

func(level int64, prestige int64) v0.Rate

rate is the accrual Rate for a level and prestige. It is rebuilt on each call rather than stored, so a mine's stored state cannot disagree with the economy after a redeploy changes a constant.

Open
OID
0c1bd7…7ded:10
rate details

Inspect func

upgradeCost

func(level int64) int64

upgradeCost is what it costs to leave the given level.

Open
OID
0c1bd7…7ded:11
upgradeCost details

Inspect func

get

func(owner .uverse.address) (*v0.mine, bool)
Open
OID
0c1bd7…7ded:12
get details

Inspect func

start

func(owner .uverse.address, at int64) string

start opens a mine for owner. Non-crossing so tests can drive the clock.

Open
OID
0c1bd7…7ded:13
start details

Inspect func

mustGet

func(owner .uverse.address) *v0.mine
Open
OID
0c1bd7…7ded:14
mustGet details

Inspect func

claim

func(owner .uverse.address, at int64) string

claim banks everything the mine has dug.

Open
OID
0c1bd7…7ded:15
claim details

Inspect func

upgrade

func(owner .uverse.address, at int64) string

upgrade spends the bank to raise the level.

Open
OID
0c1bd7…7ded:16
upgrade details

Inspect func

prestige

func(owner .uverse.address, at int64) string

prestige trades the mine for a permanent multiplier.

Open
OID
0c1bd7…7ded:17
prestige details

Inspect func

Start

func() string

Start opens a mine for the caller. One per address, forever: Prestige is the only way to start over, and it keeps your lifetime total.

Open
OID
0c1bd7…7ded:18
Start details

Inspect func

Claim

func() string

Claim banks whatever the mine has dug since the last claim. Claiming often and claiming rarely pay exactly the same, by construction: see accrual.

Open
OID
0c1bd7…7ded:19
Claim details

Inspect func

Upgrade

func() string

Upgrade spends banked ore to raise the level, which raises both the rate and the ceiling.

Open
OID
0c1bd7…7ded:20
Upgrade details

Inspect func

Prestige

func() string

Prestige resets a level-10 mine to level 1 for a permanent +1 multiplier. Banked and pending ore are burned; the lifetime total is not.

Open
OID
0c1bd7…7ded:21
Prestige details

Inspect func

Pending

func(owner .uverse.address) int64

Pending reports what is sitting in an address's mine right now, unclaimed.

Open
OID
0c1bd7…7ded:22
Pending details

Inspect func

Banked

func(owner .uverse.address) int64

Banked reports an address's spendable ore.

Open
OID
0c1bd7…7ded:23
Banked details

Inspect func

Level

func(owner .uverse.address) (int64, int64)

Level reports an address's level and prestige.

Open
OID
0c1bd7…7ded:24
Level details

Inspect func

FullAt

func(owner .uverse.address) int64

FullAt reports the unix second at which an address's mine starts wasting what it digs, which is the only deadline in this game.

Open
OID
0c1bd7…7ded:25
FullAt details

Inspect func

Render

func(path string) string

Render shows every mine, or one mine's card at /r/.../idle:\<address>. The numbers move on their own: the same URL renders differently a minute later because the mine kept digging, and nothing wrote to the chain in between. That is the whole point of the accrual pair, and it is why every figure here comes from the read-only view rather than from stored state.

Open
OID
0c1bd7…7ded:26
Render details

Inspect func

byLifetimeThenOwner

type

byLifetimeThenOwner ranks by lifetime ore, then by address so the order is identical on every node.

Value

v0.byLifetimeThenOwner

card

func(owner .uverse.address, at int64) string
Open
OID
0c1bd7…7ded:29
card details

Inspect func

span

func(secs int64) string

span renders a number of seconds the way a player reads it. It rounds down and stops at two units, because "2h 3m 11s to spill" is noise when the question is whether to claim now or after lunch.

Open
OID
0c1bd7…7ded:30
span details

Inspect func
Period : int64 =60
CapPeriods : int64 =120
UpgradeBase : int64 =10
PrestigeAt : int64 =10
MaxLevel : int64 =1000
MaxPrestige : int64 =100
errNoMine : *errors.errorString Inspect
mine : type =v0.mine
mines : v0.Tree Inspect
now : func() int64 Inspect
rate : func(level int64, prestige int64) v0.Rate Inspect
upgradeCost : func(level int64) int64 Inspect
get : func(owner .uverse.address) (*v0.mine, bool) Inspect
start : func(owner .uverse.address, at int64) string Inspect
mustGet : func(owner .uverse.address) *v0.mine Inspect
claim : func(owner .uverse.address, at int64) string Inspect
upgrade : func(owner .uverse.address, at int64) string Inspect
prestige : func(owner .uverse.address, at int64) string Inspect
Start : func() string Inspect
Claim : func() string Inspect
Upgrade : func() string Inspect
Prestige : func() string Inspect
Pending : func(owner .uverse.address) int64 Inspect
Banked : func(owner .uverse.address) int64 Inspect
Level : func(owner .uverse.address) (int64, int64) Inspect
FullAt : func(owner .uverse.address) int64 Inspect
Render : func(path string) string Inspect
byLifetimeThenOwner : type =v0.byLifetimeThenOwner
board : func(at int64) string Inspect
card : func(owner .uverse.address, at int64) string Inspect
span : func(secs int64) string Inspect