game

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executable

type Executable struct {
	Executable string              `json:"executable" yaml:"executable"`
	Arguments  *argument.Arguments `json:"arguments,omitempty" yaml:"arguments,omitempty"`
}

func (*Executable) Args

func (executable *Executable) Args() (args []string, err error)

func (*Executable) CanConnect

func (executable *Executable) CanConnect() bool

func (*Executable) Equal

func (left *Executable) Equal(right Executable) bool

func (*Executable) NormalizeState

func (executable *Executable) NormalizeState()

func (*Executable) ParseConnectArg

func (executable *Executable) ParseConnectArg(ip string) ([]string, error)

func (*Executable) ValidateLazy

func (executable *Executable) ValidateLazy() (err error)

type Game

type Game struct {
	Slug   string      `json:"slug" yaml:"slug"`
	Name   string      `json:"name" yaml:"name"`
	Client Executable  `json:"client" yaml:"client"`
	Server *Executable `json:"server,omitempty" yaml:"server,omitempty"`
}

func (*Game) CanConnectToServer

func (game *Game) CanConnectToServer() bool

func (*Game) CanStartServer

func (game *Game) CanStartServer() bool

func (Game) Equal

func (left Game) Equal(right Game) bool

func (*Game) NormalizeState

func (game *Game) NormalizeState()

func (*Game) ValidateLazy

func (game *Game) ValidateLazy() (err error)

type Games

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

func LoadFromDirectory

func LoadFromDirectory(d string) (games Games, err error)

func (*Games) Add

func (games *Games) Add(game Game) (err error)

func (*Games) Equal

func (games *Games) Equal(g Games) bool

func (Games) Games

func (games Games) Games() (gamelist []Game)

func (*Games) Get

func (games *Games) Get(slug string) (game Game, err error)

func (*Games) HasGame

func (games *Games) HasGame(slug string) bool

func (*Games) Size

func (games *Games) Size() int

func (*Games) Slugs

func (games *Games) Slugs() []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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