control

package
v0.0.0-...-8ca5219 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShipTypeTrader
	ShipTypeProbe
)
View Source
const MaximumTraderShips = 40

Variables

View Source
var (
	ErrorCannotPlanRoute = errors.New("shipController: could not plan route from specified destination")
	ErrorNotEnoughFuel   = errors.New("shipController: not enough fuel for journey and cannot buy any more")
	ErrorCannotPickCargo = errors.New("shipController: could not choose a cargo (this is probably a programming error")
)

Functions

func Start

func Start() (func(), error)

Types

type Core

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

func NewCore

func NewCore(user *stapi.User) *Core

func (*Core) ReportProfit

func (c *Core) ReportProfit(amount int)

func (*Core) Start

func (c *Core) Start()

func (*Core) TriggerStop

func (c *Core) TriggerStop()

func (*Core) WriteToStdout

func (c *Core) WriteToStdout(format string, a ...interface{})

type ShipController

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

func NewShipController

func NewShipController(ship *stapi.Ship, core *Core, shipType int, data string) *ShipController

func (*ShipController) Start

func (s *ShipController) Start()

Jump to

Keyboard shortcuts

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