Documentation ¶
Index ¶
- type Base
- type CorpGroup
- func (c *CorpGroup) AddCredits(corporationId uint64, amount float64) (float64, error)
- func (c *CorpGroup) AddResources(corporationId uint64, resource world.Resource, amount int) (int, error)
- func (c *CorpGroup) FindCorporation(corporationId uint64) (Corporation, error)
- func (c *CorpGroup) RemoveCredits(corporationId uint64, amount float64) (float64, error)
- func (c *CorpGroup) RemoveResources(corporationId uint64, resource world.Resource, amount int) (int, error)
- func (cg *CorpGroup) Run()
- type Corporation
- type CrewMember
- type Squad
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CorpGroup ¶
type CorpGroup struct { Corporations map[uint64]*Corporation RW sync.RWMutex Workers int CorpChan chan gamecomm.CorpCommand }
func NewCorpGroup ¶
func NewCorpGroup(gameChannels *gamecomm.GameChannels) *CorpGroup
func (*CorpGroup) AddCredits ¶
func (*CorpGroup) AddResources ¶
func (*CorpGroup) FindCorporation ¶
func (c *CorpGroup) FindCorporation(corporationId uint64) (Corporation, error)
func (*CorpGroup) RemoveCredits ¶
func (*CorpGroup) RemoveResources ¶
type Corporation ¶
type Corporation struct { ID uint64 Name string Reputation int Credits float64 Bases []*Base CrewMembers []*CrewMember Squads []*Squad IsPlayer bool ReputationWithOtherCorporations map[string]int Rw sync.RWMutex }
func (*Corporation) AddResourceToSquad ¶
func (*Corporation) RemoveResourcesFromSquad ¶
type CrewMember ¶
type Squad ¶
type Squad struct { Id uint64 Ships *ship.Ship CrewMembers []*CrewMember Cargo map[world.Resource]int Location world.Coordinates }
func (Squad) GetHarvestingBonus ¶
Click to show internal directories.
Click to hide internal directories.