Documentation ¶
Index ¶
- type Bot
- type Companion
- type CompanionGameData
- type CompanionSupervisor
- type GameStats
- type RunStats
- type SinglePlayerSupervisor
- type Stats
- type StatsHandler
- type Supervisor
- type SupervisorManager
- func (mng *SupervisorManager) AvailableSupervisors() []string
- func (mng *SupervisorManager) Start(characterName string) error
- func (mng *SupervisorManager) Status(characterName string) Stats
- func (mng *SupervisorManager) Stop(characterName string)
- func (mng *SupervisorManager) TogglePause(characterName string)
- type SupervisorStatus
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 (*Bot) TogglePause ¶
func (b *Bot) TogglePause()
type CompanionGameData ¶
type CompanionSupervisor ¶
type CompanionSupervisor struct {
// contains filtered or unexported fields
}
func NewCompanionSupervisor ¶
func (*CompanionSupervisor) JoinGame ¶
func (s *CompanionSupervisor) JoinGame(gameName, password string)
func (*CompanionSupervisor) Start ¶
func (s *CompanionSupervisor) Start() error
Start will return error if it can not be started, otherwise will always return nil
func (CompanionSupervisor) TogglePause ¶
func (s CompanionSupervisor) TogglePause()
type SinglePlayerSupervisor ¶
type SinglePlayerSupervisor struct {
// contains filtered or unexported fields
}
func (*SinglePlayerSupervisor) Start ¶
func (s *SinglePlayerSupervisor) Start() error
Start will return error if it can not be started, otherwise will always return nil
func (SinglePlayerSupervisor) TogglePause ¶
func (s SinglePlayerSupervisor) TogglePause()
type Stats ¶ added in v0.4.0
type Stats struct { StartedAt time.Time SupervisorStatus SupervisorStatus Details string Games []GameStats }
func (Stats) TotalChickens ¶ added in v0.4.0
func (Stats) TotalDeaths ¶ added in v0.4.0
func (Stats) TotalErrors ¶ added in v0.4.0
func (Stats) TotalGames ¶ added in v0.4.0
type StatsHandler ¶ added in v0.4.0
type StatsHandler struct {
// contains filtered or unexported fields
}
func NewStatsHandler ¶ added in v0.4.0
func NewStatsHandler(name string, logger *slog.Logger) *StatsHandler
func (*StatsHandler) SetStatus ¶
func (h *StatsHandler) SetStatus(status SupervisorStatus)
func (*StatsHandler) Stats ¶ added in v0.4.0
func (h *StatsHandler) Stats() Stats
type Supervisor ¶
type SupervisorManager ¶ added in v0.4.0
type SupervisorManager struct {
// contains filtered or unexported fields
}
func NewSupervisorManager ¶ added in v0.4.0
func NewSupervisorManager(logger *slog.Logger, additionalEventHandlers []event.Handler) *SupervisorManager
func (*SupervisorManager) AvailableSupervisors ¶ added in v0.4.0
func (mng *SupervisorManager) AvailableSupervisors() []string
func (*SupervisorManager) Start ¶ added in v0.4.0
func (mng *SupervisorManager) Start(characterName string) error
func (*SupervisorManager) Status ¶ added in v0.4.0
func (mng *SupervisorManager) Status(characterName string) Stats
func (*SupervisorManager) Stop ¶ added in v0.4.0
func (mng *SupervisorManager) Stop(characterName string)
func (*SupervisorManager) TogglePause ¶ added in v0.4.0
func (mng *SupervisorManager) TogglePause(characterName string)
type SupervisorStatus ¶ added in v0.4.0
type SupervisorStatus string
const ( NotStarted SupervisorStatus = "Not Started" Starting SupervisorStatus = "Starting" InGame SupervisorStatus = "In game" Paused SupervisorStatus = "Paused" Crashed SupervisorStatus = "Crashed" )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.