engine

package module
v0.0.0-...-d40ee1c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 5 Imported by: 0

README

engine

towers offchain game engine

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL