func (g *GameDescription) DefaultDifficulty() int64 {
	return g.Int("defaultDifficulty")
}
DefaultDifficulty returns the default difficulty.
package rep
import "github.com/icza/s2prot"
type InitData struct {
	s2prot.Struct
	GameDescription GameDescription `json:"-"`  
	LobbyState      LobbyState      `json:"-"`  
	UserInitDatas   []UserInitData  `json:"-"`  
}
func NewInitData(s s2prot.Struct) InitData {
	i := InitData{Struct: s.Structv("syncLobbyState")}
	i.GameDescription = GameDescription{Struct: i.Structv("gameDescription")}
	i.GameDescription.GameOptions = GameOptions{Struct: i.GameDescription.Structv("gameOptions")}
	i.LobbyState = LobbyState{Struct: i.Structv("lobbyState")}
	slots := i.LobbyState.Array("slots")
	i.LobbyState.Slots = make([]Slot, len(slots))
	for j, s := range slots {
		i.LobbyState.Slots[j] = Slot{Struct: s.(s2prot.Struct)}
	}
	uids := i.Array("userInitialData")
	i.UserInitDatas = make([]UserInitData, len(uids))
	for j, uid := range uids {
		u := UserInitData{Struct: uid.(s2prot.Struct)}
		if cl := u.Stringv("clanLogo"); cl != "" {
			u.ClanLogo = newCacheHandle(cl)
		}
		i.UserInitDatas[j] = u
	}
	return i
}
type GameDescription struct {
	s2prot.Struct
	GameOptions      GameOptions
	cacheHandles     []*CacheHandle     
	slotDescriptions []SlotDescription  
}
func (g *GameDescription) Region() *Region {
	if chs := g.CacheHandles(); len(chs) > 0 {
		return chs[0].Region
	}
	return RegionUnknown
}
func (g *GameDescription) ExpLevel() *ExpLevel {
	if chs := g.CacheHandles(); len(chs) > 0 {
		for _, exp := range ExpLevels {
			for _, ch := range chs {
				if exp.Digest == ch.Digest {
					return exp
				}
			}
		}
	}
	return ExpLevelUnknown
}
func (g *GameDescription) GameSpeed() *GameSpeed {
	return GameSpeeds[g.Int("gameSpeed")]
}
func (g *GameDescription) HasExtensionMod() bool {
	return g.Bool("hasExtensionMod")
}
func (g *GameDescription) HasNonBlizzardExtensionMod() bool {
	return g.Bool("hasNonBlizzardExtensionMod")
}
func (g *GameDescription) IsBlizzardMap() bool {
	return g.Bool("isBlizzardMap")
}
func (g *GameDescription) GameType() int64 {
	return g.Int("gameType")
}
func (g *GameDescription) IsCoopMode() bool {
	return g.Bool("isCoopMode")
}
func (g *GameDescription) IsPremadeFFA() bool {
	return g.Bool("isPremadeFFA")
}
func (g *GameDescription) MapAuthorName() string {
	return g.Stringv("mapAuthorName")
}
func (g *GameDescription) MapFileName() string {
	return g.Stringv("mapFileName")
}
func (g *GameDescription) MapFileSyncChecksum() int64 {
	return g.Int("mapFileSyncChecksum")
}
func (g *GameDescription) MapSizeX() int64 {
	return g.Int("mapSizeX")
}
func (g *GameDescription) MapSizeY() int64 {
	return g.Int("mapSizeY")
}
func (g *GameDescription) MaxColors() int64 {
	return g.Int("maxColors")
}
func (g *GameDescription) MaxControls() int64 {
	return g.Int("maxControls")
}
func (g *GameDescription) MaxObservers() int64 {
	return g.Int("maxObservers")
}
func (g *GameDescription) MaxPlayers() int64 {
	return g.Int("maxPlayers")
}
func (g *GameDescription) MaxRaces() int64 {
	return g.Int("maxRaces")
}
func (g *GameDescription) MaxTeams() int64 {
	return g.Int("maxTeams")
}
func (g *GameDescription) MaxUsers() int64 {
	return g.Int("maxUsers")
}
func (g *GameDescription) ModFileSyncChecksum() int64 {
	return g.Int("modFileSyncChecksum")
}
func (g *GameDescription) RandomValue() int64 {
	return g.Int("randomValue")
}
func (g *GameDescription) GameCacheName() string {
	return g.Stringv("gameCacheName")
}
func (g *GameDescription) DefaultAIBuild() int64 {
	return g.Int("defaultAIBuild")
}