func (g *Game) join(event js.Value) {
	joinGameButton := event.Get("srcElement")
	gameIDInput := joinGameButton.Get("previousElementSibling")
	idText := gameIDInput.Get("value").String()
	id, err := strconv.Atoi(idText)
	if err != nil {
		g.log.Error("could not get Id of game: " + err.Error())
		return
	}
	g.id = game.ID(id)
	m := message.Message{
		Type: message.JoinGame,
	}
	g.setTabActive(m)
}
// join asks the server to join an existing game.
join asks the server to join an existing game.
// join asks the server to join an existing game .
func (g *Game) join(event js.Value) {
	joinGameButton := event.Get("srcElement")
	gameIDInput := joinGameButton.Get("previousElementSibling")
	idText := gameIDInput.Get("value").String()
	id, err := strconv.Atoi(idText)
	if err != nil {
		g.log.Error("could not get Id of game: " + err.Error())
		return
	}
	g.id = game.ID(id)
	m := message.Message{
		Type: message.JoinGame,
	}
	g.setTabActive(m)
}
func ( g * Game ) join ( event js . Value ) { joinGameButton := event . Get ( " " ) gameIDInput := joinGameButton . Get ( " " ) idText := gameIDInput . Get ( " " ) . String ( ) id , err := strconv . Atoi ( idText ) if err != nil { g . log . Error ( " " + err . Error ( ) ) return } g . id = game . ID ( id ) m := message . Message { Type : message . JoinGame , } g . setTabActive ( m ) }
join asks the server to join an existing game.
join asks the server to join an existing game .