func (self *HTTPContext) ChatFlagMap() string { return gosubs.Prettify(map[string]int{ "ChatPrivate": ChatPrivate, "ChatGroup": ChatGroup, "ChatConference": ChatConference, }) }
func (self *HTTPContext) SecretFlagMap() string { return gosubs.Prettify(map[string]int{ "BeforeGame": SecretBeforeGame, "DuringGame": SecretDuringGame, "AfterGame": SecretAfterGame, }) }
func (self *HTTPContext) SecrecyTypesMap() string { return gosubs.Prettify(map[string]string{ "SecretEmail": self.mI("Secret email"), "SecretNickname": self.mI("Secret nickname"), "SecretNation": self.mI("Secret nation"), }) }
func (self *HTTPContext) ConsequenceMap() string { return gosubs.Prettify(map[string]Consequence{ "ReliabilityHit": ReliabilityHit, "NoWait": NoWait, "Surrender": Surrender, }) }
func (self *HTTPContext) VariantMap() string { result := map[string]Variant{} for _, variant := range Variants { variant.Translation = self.mI(variant.Name) result[variant.Id] = variant } return gosubs.Prettify(result) }
func (self *HTTPContext) Variants() string { result := sort.StringSlice{} for _, variant := range Variants { result = append(result, variant.Id) } sort.Sort(result) return gosubs.Prettify(result) }
func (self *HTTPContext) AllocationMethods() string { result := sort.StringSlice{} for _, meth := range AllocationMethods { result = append(result, meth.Id) } sort.Sort(result) return gosubs.Prettify(result) }
func (self *HTTPContext) AllocationMethodMap() string { result := map[string]AllocationMethod{} for _, meth := range AllocationMethodMap { meth.Translation = self.mI(meth.Name) result[meth.Id] = meth } return gosubs.Prettify(result) }
func (self *HTTPContext) VariantMap() string { result := map[string]*Variant{} for _, variant := range Variants { cpy := *variant cpy.Translation = self.mI(cpy.Name) result[cpy.Id] = &cpy } return gosubs.Prettify(result) }
func (self *HTTPContext) VariantMainProvincesMap() string { result := map[string][]dip.Province{} for _, variant := range Variants { result[variant.Id] = []dip.Province{} for _, prov := range variant.Graph.Provinces() { if prov.Super() == prov { result[variant.Id] = append(result[variant.Id], prov) } } } return gosubs.Prettify(result) }
func (self *HTTPContext) VariantColorizableProvincesMap() string { result := map[string][]dip.Province{} for _, variant := range Variants { supers := map[dip.Province]bool{} for _, prov := range variant.Graph.Provinces() { supers[prov.Super()] = true } for prov, _ := range supers { result[variant.Id] = append(result[variant.Id], prov) } } return gosubs.Prettify(result) }