gamesrv

package
v0.0.0-...-fc44d3c Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func New

func New(db *database.Db) *Service

func (Service) CreatePlanet

func (srv Service) CreatePlanet(userId bson.ObjectId) (*models.SolarSystem, *models.Planet, error)

CreatePlanet is used when a user conquers a planet

func (Service) GetPlanet

func (srv Service) GetPlanet(user *models.User, planetid bson.ObjectId) (*models.Planet, error)

func (Service) PutPlanetInSolarSystem

func (srv Service) PutPlanetInSolarSystem(position int64, planet *models.Planet) (*models.SolarSystem, error)

func (Service) UpgradeBuilding

func (srv Service) UpgradeBuilding(user *models.User, planetid bson.ObjectId, building string) (*models.Planet, error)

Jump to

Keyboard shortcuts

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