lobby

package
v0.0.0-...-c857007 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Rendered for js/wasm

Overview

Package lobby contains code to view available games and to close the websocket.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lobby

type Lobby struct {
	Game   *controller.Game
	Socket Socket
}

func (*Lobby) InitDom

func (l *Lobby) InitDom(ctx context.Context, wg *sync.WaitGroup)

InitDom regesters lobby dom functions

func (*Lobby) SetGameInfos

func (l *Lobby) SetGameInfos(gameInfos []game.Info, username string)

setGameInfos updates the game-infos table with the game infos for the username.

type Socket

type Socket interface {
	Connect(event js.Value) error
	Close()
}

Socket is a structure that connects the server to the lobby.

Jump to

Keyboard shortcuts

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