core

package
v0.0.0-...-e6555c8 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dashboard

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

Dashboard implementation

func (Dashboard) Start

func (d Dashboard) Start()

type Engine

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

Engine implementation

func (Engine) FinishGame

func (e Engine) FinishGame()

func (*Engine) Start

func (e *Engine) Start()

func (Engine) Stop

func (e Engine) Stop()

type ExitHandler

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

Exit handler implementation

func (*ExitHandler) IsRunning

func (e *ExitHandler) IsRunning() bool

func (*ExitHandler) On

func (e *ExitHandler) On(toRun func())

func (*ExitHandler) Trigger

func (e *ExitHandler) Trigger()

type IDashboard

type IDashboard interface {
	// Starts the dashboard process [This is a blocking call]
	Start()
}

Describes a dashboard interface

func NewDashboard

func NewDashboard(
	eventBus bus.IBus,
	scoreService scoreboard.IService,
	combatService combat.IService,
	playerService player.IService,
) IDashboard

Constructor for dashboard

type IEngine

type IEngine interface {
	// Starts the engine process [This is a blocking call]
	Start()
	// Stops the engine process
	Stop()
	// Calculates the results of the game
	FinishGame()
}

Describes and engine interface

func NewEngine

func NewEngine(
	port int,
	bus bus.IBus,
	scoreService scoreboard.IService,
	combatService combat.IService,
	playerService player.IService,
) IEngine

Constructor for Engine

type IExitHandler

type IExitHandler interface {
	// Subscribe a function to run when exit should happen
	On(func())
	// Trigger calls all functions at the same time
	Trigger()
	// Returns if exit is already been initiated
	IsRunning() bool
}

Describes an exit handler interface

func NewExitHandler

func NewExitHandler() IExitHandler

Constructor for the exit handler

Directories

Path Synopsis
dto

Jump to

Keyboard shortcuts

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