func (g *Game) createWithConfig(event js.Value) {
	checkOnSnag := g.dom.Checked(".checkOnSnag")
	penalize := g.dom.Checked(".penalize")
	minLengthStr := g.dom.Value(".minLength")
	minLength, err := strconv.Atoi(minLengthStr)
	if err != nil {
		g.log.Error("retrieving minimum word length: " + err.Error())
		return
	}
	prohibitDuplicates := g.dom.Checked(".prohibitDuplicates")
	m := message.Message{
		Type: message.CreateGame,
		Game: &game.Info{
			Config: &game.Config{
				CheckOnSnag:        checkOnSnag,
				Penalize:           penalize,
				MinLength:          minLength,
				ProhibitDuplicates: prohibitDuplicates,
			},
		},
	}
	g.setTabActive(m)
}
// createWithConfig clears the tiles and asks the server for a new game to join with the create config.
createWithConfig clears the tiles and asks the server for a new game to join with the create config.
// createWithConfig clears the tiles and asks the server for a new game to join with the create config .
func (g *Game) createWithConfig(event js.Value) {
	checkOnSnag := g.dom.Checked(".checkOnSnag")
	penalize := g.dom.Checked(".penalize")
	minLengthStr := g.dom.Value(".minLength")
	minLength, err := strconv.Atoi(minLengthStr)
	if err != nil {
		g.log.Error("retrieving minimum word length: " + err.Error())
		return
	}
	prohibitDuplicates := g.dom.Checked(".prohibitDuplicates")
	m := message.Message{
		Type: message.CreateGame,
		Game: &game.Info{
			Config: &game.Config{
				CheckOnSnag:        checkOnSnag,
				Penalize:           penalize,
				MinLength:          minLength,
				ProhibitDuplicates: prohibitDuplicates,
			},
		},
	}
	g.setTabActive(m)
}
func ( g * Game ) createWithConfig ( event js . Value ) { checkOnSnag := g . dom . Checked ( " " ) penalize := g . dom . Checked ( " " ) minLengthStr := g . dom . Value ( " " ) minLength , err := strconv . Atoi ( minLengthStr ) if err != nil { g . log . Error ( " " + err . Error ( ) ) return } prohibitDuplicates := g . dom . Checked ( " " ) m := message . Message { Type : message . CreateGame , Game : & game . Info { Config : & game . Config { CheckOnSnag : checkOnSnag , Penalize : penalize , MinLength : minLength , ProhibitDuplicates : prohibitDuplicates , } , } , } g . setTabActive ( m ) }
createWithConfig clears the tiles and asks the server for a new game to join with the create config.
createWithConfig clears the tiles and asks the server for a new game to join with the create config .