pilots.gno
0.46 Kb · 15 lines
1package game
2
3// What the realm remembers about a player is their kills, recorded by the
4// referees: pilots maps an address to an int64, allocated at the first kill.
5// A player without a record has none. Skins and planes are tokens of their
6// own realms (gnofly/nfts/skins, gnofly/nfts/planes).
7
8// killsOf returns the kills recorded for addr.
9func recordedKills(addr address) int64 {
10 v := pilots.Get(addr.String())
11 if v == nil {
12 return 0
13 }
14 return v.(int64)
15}