Documentation
¶
Rendered for js/wasm
Overview ¶
Package controller has the ui game logic.
Index ¶
- type Game
- func (g *Game) Create()
- func (g *Game) Delete()
- func (g *Game) Finish()
- func (g *Game) InitDom(ctx context.Context, wg *sync.WaitGroup)
- func (g *Game) Join(id int)
- func (g *Game) Leave()
- func (g *Game) SendChat(message string)
- func (g *Game) SnagTile()
- func (g *Game) Start()
- func (g *Game) UpdateInfo(m game.Message)
- type Socket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Game ¶
type Game struct { Socket Socket // contains filtered or unexported fields }
Game handles managing the state of the board and drawing it on the canvas.
func (*Game) Create ¶
func (g *Game) Create()
Create clears the tiles and asks the server for a new game to join
func (*Game) Finish ¶
func (g *Game) Finish()
Starts triggers the game to finish for everyone by checking the players tiles.
func (*Game) SnagTile ¶
func (g *Game) SnagTile()
SnagTile asks the game to give everone a new tile.
func (*Game) UpdateInfo ¶
UpdateInfo updates the game for the specified message.
Click to show internal directories.
Click to hide internal directories.