universe

package
v0.0.0-...-f4faf77 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TotalSectors = 9

Variables

This section is empty.

Functions

This section is empty.

Types

type Sector

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

func (*Sector) AddNewShip

func (sector *Sector) AddNewShip(shipName string) string

func (*Sector) ChangeSector

func (sector *Sector) ChangeSector(travelingShip ship.Ship, destinationSectorName string) bool

func (*Sector) GetConnectedSectorByName

func (sector *Sector) GetConnectedSectorByName(sectorName string) *Sector

func (*Sector) GetConnectedSectors

func (sector *Sector) GetConnectedSectors() []string

func (*Sector) GetShipByName

func (sector *Sector) GetShipByName(shipName string) *ship.Ship

func (*Sector) IsShipNameAvailable

func (sector *Sector) IsShipNameAvailable(shipName string) bool

func (*Sector) ScanSector

func (sector *Sector) ScanSector() []string

func (*Sector) ShootWeapons

func (sector *Sector) ShootWeapons(attacker ship.Ship, victim *ship.Ship)

type Universe

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

func CreateUniverse

func CreateUniverse() *Universe

func (*Universe) CreateNewShip

func (universe *Universe) CreateNewShip(shipName string) (bool, string)

func (*Universe) GetSectorByName

func (universe *Universe) GetSectorByName(sectorName string) *Sector

func (*Universe) HasShipInSector

func (universe *Universe) HasShipInSector(shipName string, sectorName string) bool

Jump to

Keyboard shortcuts

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