koolo

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

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

Bot will be in charge of running the run loop: create games, traveling, killing bosses, repairing, picking...

func NewBot

func NewBot(
	logger *zap.Logger,
	hm health.Manager,
	ab *action.Builder,
	gr *reader.GameReader,
) *Bot

func (*Bot) Run

func (b *Bot) Run(ctx context.Context, firstRun bool, runs []run.Run) (err error)

func (*Bot) TogglePause

func (b *Bot) TogglePause()

type Companion

type Companion interface {
	JoinGame(gameName, password string)
}

type CompanionGameData

type CompanionGameData struct {
	GameName string
	Password string
}

type CompanionSupervisor

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

func NewCompanionSupervisor

func NewCompanionSupervisor(logger *zap.Logger, bot *Bot, gr *reader.GameReader, gm *helper.GameManager) *CompanionSupervisor

func (*CompanionSupervisor) JoinGame

func (s *CompanionSupervisor) JoinGame(gameName, password string)

func (*CompanionSupervisor) Start

func (s *CompanionSupervisor) Start(ctx context.Context, factory *run.Factory) error

Start will stay running during the application lifecycle, it will orchestrate all the required bot pieces

func (*CompanionSupervisor) Stop

func (s *CompanionSupervisor) Stop()

func (*CompanionSupervisor) TogglePause

func (s *CompanionSupervisor) TogglePause()

type SinglePlayerSupervisor

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

func NewSinglePlayerSupervisor

func NewSinglePlayerSupervisor(logger *zap.Logger, bot *Bot, gr *reader.GameReader, gm *helper.GameManager) *SinglePlayerSupervisor

func (*SinglePlayerSupervisor) Start

func (s *SinglePlayerSupervisor) Start(ctx context.Context, factory *run.Factory) error

Start will stay running during the application lifecycle, it will orchestrate all the required bot pieces

func (*SinglePlayerSupervisor) Stop

func (s *SinglePlayerSupervisor) Stop()

func (*SinglePlayerSupervisor) TogglePause

func (s *SinglePlayerSupervisor) TogglePause()

type Supervisor

type Supervisor interface {
	Start(ctx context.Context, factory *run.Factory) error
	Stop()
	TogglePause()
}

Directories

Path Synopsis
tcp
remote

Jump to

Keyboard shortcuts

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