dt

package
v0.5.39 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginDT

type PluginDT struct {
	sgc7plugin.BasicPlugin

	Rngs      []uint32
	RngClient *RngClient
}

PluginDT - plugin for DT

func NewPluginDT

func NewPluginDT(rngServAddr string, gameCode string) *PluginDT

NewPluginDT - new PluginDT (IPlugin)

func (*PluginDT) ClearCache

func (plugin *PluginDT) ClearCache()

ClearCache - clear cached rngs

func (*PluginDT) Init

func (plugin *PluginDT) Init()

Init - initial

func (*PluginDT) Random

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

Random - return [0, r)

func (*PluginDT) SetCache

func (plugin *PluginDT) 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