manager

package
v0.0.0-...-e5b420f Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameManager

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

GameManager

func NewGameManager

func NewGameManager(mazeMap *maze.Map) *GameManager

NewGameManager will handle and communicate throw APIs

func (*GameManager) AddMovement

func (gm *GameManager) AddMovement(info PlayerInfo)

AddMovement of player

func (*GameManager) GetPlayerMovements

func (gm *GameManager) GetPlayerMovements() (moves []byte)

GetPlayerMovements only possible path

type PlayerInfo

type PlayerInfo struct {
	// Name of player
	Name string `json:"name"`
	// ID unique key
	ID string `json:"id"`
	// CurrentLocation of the player
	CurrentLocation maze.Point `json:"current"`
	// MovementPath next destination
	MovementPath []maze.Point `json:"path"`
}

PlayerInfo

Jump to

Keyboard shortcuts

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