internal

package
v0.0.0-...-80b3644 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Debug       = false
	RunFractals = true
)

Variables

This section is empty.

Functions

func AnalyzeSystem

func AnalyzeSystem(system *System)

Types

type System

type System struct {
	BadAcceptCount int
	BadRejectCount int
	FractalCounter int
	Locker         sync.Mutex
	SubmitCount    map[string]int
	AcceptedCount  map[string]int
	Traders        map[string]*pkg.Trader
	Coins          map[string]pkg.CoinTable
	Fractals       map[string]*pkg.FractalRing
}

func Load

func Load(filePath string) (*System, error)

func NewSystem

func NewSystem() *System

func (*System) CreateRandomCoins

func (system *System) CreateRandomCoins(trader *pkg.Trader, done <-chan bool, errors chan<- error)

func (*System) Init

func (system *System) Init(numTraders, numRandomVoters, numBadVoters int, coinTypeCount uint) error

func (*System) ProcessCoin

func (system *System) ProcessCoin(coin pkg.CoinTable) error

func (*System) Save

func (system *System) Save(filePath string) error

func (*System) Start

func (system *System) Start(finish <-chan bool)

Jump to

Keyboard shortcuts

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