theater

package
v0.0.0-...-0379cd4 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameRequest

type GameRequest struct {
	PlayerID int
	HeroID   int
	HeroName string
	GameID   int
	LobbyID  string
	Stats    ranking.Stats
	Ticket   string
}

type Theater

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

Theater Handles incoming and outgoing theater communication

func New

func New(bind string, db database.Adapter, kvs *kvstore.Storage, mm *matchmaking.Pool) *Theater

New creates and starts a new TheaterManager

func (*Theater) Connect

func (tm *Theater) Connect(event network.EventClientCommand)

func (*Theater) CreateGame

func (tm *Theater) CreateGame(event network.EventClientCommand)

func (*Theater) ECHO

func (tm *Theater) ECHO(event network.SocketUDPEvent)

func (*Theater) EGEG

func (tm *Theater) EGEG(event *network.EventClientCommand, gameServer *network.Client, gr GameRequest)

EGEG is sent Client to receive last confirmation before joining game

func (*Theater) EnterConnectionLAN

func (tm *Theater) EnterConnectionLAN(event network.EventClientCommand)

func (*Theater) EnterGame

func (tm *Theater) EnterGame(event network.EventClientCommand)

a EGAM - CLIENT called when a client wants to join a gameserver

func (*Theater) EnterGameHostResponse

func (tm *Theater) EnterGameHostResponse(event network.EventClientCommand)

EGRS - SERVER sent up, tell us if client is 'allowed' to join

func (*Theater) EnterGameRequest

func (tm *Theater) EnterGameRequest(event *network.EventClientCommand, gameServer *network.Client, gr GameRequest)

EnterGameRequest (EGRQ) is sent to Server to inform about the player who wants join server

func (*Theater) GameData

func (tm *Theater) GameData(event network.EventClientCommand)

GDAT - CLIENT called to get data about the server

func (*Theater) GetLobbyList

func (tm *Theater) GetLobbyList(event network.EventClientCommand)

func (*Theater) ListenAndServe

func (tm *Theater) ListenAndServe(ctx context.Context)

func (*Theater) LobbyData

func (tm *Theater) LobbyData(event network.EventClientCommand)

func (*Theater) Login

func (tm *Theater) Login(event network.EventClientCommand)

func (*Theater) PING

func (tm *Theater) PING(client *network.Client)

func (*Theater) PlayerEntered

func (tm *Theater) PlayerEntered(event network.EventClientCommand)

PlayerEntered player joined game

func (*Theater) PlayerExited

func (tm *Theater) PlayerExited(event network.EventClientCommand)

func (*Theater) Run

func (tm *Theater) Run(ctx context.Context)

func (*Theater) UpdateBracket

func (tm *Theater) UpdateBracket(event network.EventClientCommand)

func (*Theater) UpdateGameData

func (tm *Theater) UpdateGameData(event network.EventClientCommand)

func (*Theater) UpdatePlayerData

func (tm *Theater) UpdatePlayerData(event network.EventClientCommand)

Jump to

Keyboard shortcuts

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