orbits

package
v0.0.0-...-0456d50 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deposit

type Deposit struct {
	Id           string // unique identifier for deposit
	Resource     Resource
	ControlledBy string // id of nation controlling this deposit
	QtyInitial   int
	QtyRemaining int
}

type Orbit

type Orbit struct {
	Id           string // unique identifier for the orbit
	Location     coordinates.Coordinates
	Kind         OrbitKind // kind of orbit
	Habitability int       // range 0..25
	ControlledBy string    // id of nation controlling this orbit
	Colonies     struct {
		Open    []string // id of open surface colonies
		Closed  []string // id of closed surface colonies
		Orbital []string // id of orbital colonies
	}
	Deposits []Deposit // deposits of resources
}

type OrbitKind

type OrbitKind int
const (
	Empty OrbitKind = iota
	AsteroidBelt
	GasGiant
	Terrestrial
)

func (OrbitKind) MarshalJSON

func (k OrbitKind) MarshalJSON() ([]byte, error)

MarshalJSON implements the Marshaler interface.

func (*OrbitKind) UnmarshalJSON

func (k *OrbitKind) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the Unmarshaler interface.

type Resource

type Resource int

Jump to

Keyboard shortcuts

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