server

package
v0.0.0-...-c761d76 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

type Game struct {
	ID        string
	Count     int
	CountFish int
	CountFarm int
	Status    string

	LocationFish []*models.Point
	LocationFarm []*models.Point
	// contains filtered or unexported fields
}

type RespOnwater

type RespOnwater struct {
	Query     string  `json:"query,omitempty"`
	RequestID string  `json:"request_id,omitempty"`
	Lat       float64 `json:"lat,omitempty"`
	Lon       float64 `json:"lon,omitempty"`
	Water     bool    `json:"water,omitempty"`
}

for checking if there is water will be used service https://onwater.io/

type Server

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

func NewServer

func NewServer() *Server

func (*Server) DestroyDisaster

func (s *Server) DestroyDisaster(id string, goal *models.Point) (*models.GameState, error)

func (*Server) GameDestroyDisasterHandler

func (s *Server) GameDestroyDisasterHandler() game.DestroyDisasterHandler

func (*Server) GameGetGameDescriptionHandler

func (s *Server) GameGetGameDescriptionHandler() game.GetGameDescriptionHandler

func (*Server) GameGetGameStateHandler

func (s *Server) GameGetGameStateHandler() game.GetGameStateHandler

func (*Server) GamePauseGameHandler

func (s *Server) GamePauseGameHandler() game.PauseGameHandler

func (*Server) GameResumeGameHandler

func (s *Server) GameResumeGameHandler() game.ResumeGameHandler

func (*Server) GameStartGameHandler

func (s *Server) GameStartGameHandler() game.StartGameHandler

func (*Server) GetGameDescription

func (s *Server) GetGameDescription(id string) (*models.GameDescription, error)

func (*Server) GetGameState

func (s *Server) GetGameState(id string) (*models.GameState, error)

func (*Server) PauseGame

func (s *Server) PauseGame(id string) (*models.GameDescription, error)

func (*Server) ResumeGame

func (s *Server) ResumeGame(id string) (*models.GameDescription, error)

func (*Server) StartGame

func (s *Server) StartGame() (*models.GameDescription, error)

Jump to

Keyboard shortcuts

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