Documentation ¶
Index ¶
- Constants
- Variables
- func FormMapUrl(baseUrl string, mapType PlayMap, detailed bool) string
- func GetColorStringForInt(colorint int) string
- func IsColorString(test string) bool
- type GameDelays
- type GameResult
- type GameRole
- type Gameover
- type Lobby
- type Phase
- type PhaseNameString
- type PlayMap
- type Player
- type PlayerAction
- type PlayerInfo
- type Region
- type VoiceRules
Constants ¶
View Source
const ( Red = 0 Blue = 1 Green = 2 Pink = 3 Orange = 4 Yellow = 5 Black = 6 White = 7 Purple = 8 Brown = 9 Cyan = 10 Lime = 11 Maroon = 12 Rose = 13 Banana = 14 Gray = 15 Tan = 16 Coral = 17 )
Color : Int constant mapping
View Source
const DefaultMapsUrl = "https://github.com/automuteus/automuteus/blob/master/assets/maps/"
Variables ¶
View Source
var ColorStrings = map[string]int{ "red": Red, "blue": Blue, "green": Green, "pink": Pink, "orange": Orange, "yellow": Yellow, "black": Black, "white": White, "purple": Purple, "brown": Brown, "cyan": Cyan, "lime": Lime, "maroon": Maroon, "rose": Rose, "banana": Banana, "gray": Gray, "tan": Tan, "coral": Coral, }
ColorStrings for lowercase, possibly for translation if needed
View Source
var MapNames = map[PlayMap]string{ SKELD: "Skeld", MIRA: "Mira", POLUS: "Polus", DLEKS: "dlekS", AIRSHIP: "Airship", FUNGLE: "Fungle", }
View Source
var PhaseNames = map[Phase]PhaseNameString{ LOBBY: "LOBBY", TASKS: "TASKS", DISCUSS: "DISCUSSION", MENU: "MENU", }
PhaseNames for lowercase, possibly for translation if needed
Functions ¶
func GetColorStringForInt ¶
GetColorStringForInt does what it sounds like
func IsColorString ¶
IsColorString determines if a string is actually one of our colors
Types ¶
type GameDelays ¶
type GameDelays struct { // maps from origin->new phases, with the integer number of seconds for the delay Delays map[PhaseNameString]map[PhaseNameString]int `json:"delays"` }
GameDelays struct
func MakeDefaultDelays ¶
func MakeDefaultDelays() GameDelays
func (*GameDelays) GetDelay ¶
func (gd *GameDelays) GetDelay(origin, dest Phase) int
type GameResult ¶
type GameResult int16
const ( HumansByVote GameResult = iota HumansByTask ImpostorByVote ImpostorByKill ImpostorBySabotage ImpostorDisconnect HumansDisconnect Unknown )
type Gameover ¶
type Gameover struct { GameOverReason GameResult `json:"GameOverReason"` PlayerInfos []PlayerInfo `json:"PlayerInfos"` }
type PhaseNameString ¶
type PhaseNameString string
type Player ¶
type Player struct { Action PlayerAction `json:"Action"` Name string `json:"Name"` Color int `json:"Color"` IsDead bool `json:"IsDead"` Disconnected bool `json:"Disconnected"` }
Player struct
type PlayerAction ¶
type PlayerAction int
const ( JOINED PlayerAction = iota LEFT DIED CHANGECOLOR FORCEUPDATED DISCONNECTED EXILED )
type PlayerInfo ¶
type VoiceRules ¶
type VoiceRules struct { MuteRules map[PhaseNameString]map[string]bool DeafRules map[PhaseNameString]map[string]bool }
func MakeMuteAndDeafenRules ¶
func MakeMuteAndDeafenRules() VoiceRules
func (*VoiceRules) GetVoiceState ¶
func (rules *VoiceRules) GetVoiceState(isAlive, isTracked bool, phase Phase) (bool, bool)
Click to show internal directories.
Click to hide internal directories.