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.

gnoslinger/v0 package

Overview

Package gnoslinger is the on-chain lobby and referee of Gunslinger showdowns (the 1982 Avalon Hill gunfight game) of two to four players. Players create and join games and play their turn plans hidden: each commits the hash of its plan, then reveals it once every plan is committed (DESIGN_HIDDEN_PLANS.md); the realm resolves each turn with the pure engine package and keeps the result for the web client to animate.

Function

HistoryJSON

func HistoryJSON(id string) string
Ask AI Claude ChatGPT

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.

Example
1{"id","turn","phase","players":[{"addr","char"}],"turns":[turn result...]}

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1th0masp67zfs9lg6d34qhghldhg6kjcqjuv7c2/gnoslinger/v0.HistoryJSON()"

Result