domain

package
v0.0.0-...-2ef2c73 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Src  string `json:"from"`
	Dest string `json:"to"`
}

type MasterConfig

type MasterConfig struct {
	Port      string `envconfig:"PORT"               required:"false" default:":8080"`
	RedisAddr string `envconfig:"REDIS_ADDR"               required:"false" default:"redis:6379"`
	Players   int    `envconfig:"COMPETITORS"`
}

type Player

type Player struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Health int    `json:"health"`
	Damage int    `json:"damage"`
}

func (*Player) IsEmpty

func (c *Player) IsEmpty() bool

type PlayerConfig

type PlayerConfig struct {
	RedisAddr  string `envconfig:"REDIS_ADDR"           required:"false" default:"redis:6379"`
	MasterAddr string `envconfig:"MASTER_ADDR"          required:"false" default:"http://master:8080"`
	Name       string `envconfig:"NAME"                 required:"true"`
	Health     int    `envconfig:"HEALTH"               required:"false" default:"10"`
	Damage     int    `envconfig:"DAMAGE"               required:"false" default:"1"`
}

type Round

type Round struct {
	Players map[string]*Player
}

Jump to

Keyboard shortcuts

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