bgg

package
v0.13.310 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin added in v0.10.388

type Plugin struct {
	sgc7plugin.BasicPlugin

	Rngs      []uint32
	RngClient *RngClient
}

Plugin - plugin for BGG

func NewPlugin added in v0.10.388

func NewPlugin(rngServAddr string, gameCode string, useOpenTelemetry bool) *Plugin

NewPlugin - new Plugin (IPlugin)

func (*Plugin) ClearCache added in v0.10.388

func (plugin *Plugin) ClearCache()

ClearCache - clear cached rngs

func (*Plugin) Init added in v0.10.388

func (plugin *Plugin) Init()

Init - initial

func (*Plugin) Random added in v0.10.388

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

Random - return [0, r)

func (*Plugin) SetCache added in v0.10.388

func (plugin *Plugin) 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, useOpenTelemetry bool) *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