bgg

package
v0.10.193 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginBGG

type PluginBGG struct {
	sgc7plugin.BasicPlugin

	Rngs      []uint32
	RngClient *RngClient
}

PluginBGG - plugin for BGG

func NewPluginBGG

func NewPluginBGG(rngServAddr string, gameCode string) *PluginBGG

NewPluginBGG - new PluginBGG (IPlugin)

func (*PluginBGG) ClearCache

func (plugin *PluginBGG) ClearCache()

ClearCache - clear cached rngs

func (*PluginBGG) Init

func (plugin *PluginBGG) Init()

Init - initial

func (*PluginBGG) Random

func (plugin *PluginBGG) Random(ctx context.Context, r int) (int, error)

Random - return [0, r)

func (*PluginBGG) SetCache

func (plugin *PluginBGG) SetCache(arr []int)

SetCache - set cache

type RngClient

type RngClient struct {
	// contains filtered or unexported fields
}

RngClient - DTRngClient

func NewRngClient

func NewRngClient(servAddr string, gameCode string) *RngClient

NewRngClient - new RngClient

func (*RngClient) GetRngs

func (client *RngClient) GetRngs(ctx context.Context, nums int) ([]uint32, error)

GetRngs - get rngs

Jump to

Keyboard shortcuts

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