core

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotOperator

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

func NewBotOperator

func NewBotOperator(ctx context.Context, gameId int,
	connector Connector) *BotOperator

func (*BotOperator) Run

func (bo *BotOperator) Run(ctx context.Context)

func (*BotOperator) Stop

func (bo *BotOperator) Stop()

type Connector

type Connector interface {
	Connect(ctx context.Context, gameId int) (connect.Connection, error)
}

type Core

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

func NewCore

func NewCore(ctx context.Context, connector Connector, botsLimit int) *Core

func (*Core) ApplyState

func (c *Core) ApplyState(state map[int]int) (map[int]int, error)

func (*Core) ReadState

func (c *Core) ReadState() map[int]int

func (*Core) SetupOne

func (c *Core) SetupOne(gameId, bots int) (map[int]int, error)

Jump to

Keyboard shortcuts

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