README ¶ engine towers offchain game engine Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type Config type Engine func New(c Config) *Engine func (e *Engine) Balance(use string) int func (e *Engine) Claim(use string) (*big.Int, error) func (e *Engine) Deposit(tnx string, use string, bal int) error func (e *Engine) Finish() int func (e *Engine) Vote(tow int, use string, amo int, bal int) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Config ¶ type Config struct { // Dwn is the countdown duration that has to pass without any further deposits // in order for the leading tower to win. Dwn time.Duration Now func() time.Time } type Engine ¶ type Engine struct { // contains filtered or unexported fields } func New ¶ func New(c Config) *Engine func (*Engine) Balance ¶ func (e *Engine) Balance(use string) int func (*Engine) Claim ¶ func (e *Engine) Claim(use string) (*big.Int, error) func (*Engine) Deposit ¶ func (e *Engine) Deposit(tnx string, use string, bal int) error func (*Engine) Finish ¶ func (e *Engine) Finish() int TODO test func (*Engine) Vote ¶ func (e *Engine) Vote(tow int, use string, amo int, bal int) error Source Files ¶ View all Source files balance.go claim.go deposit.go engine.go finish.go vote.go Click to show internal directories. Click to hide internal directories.