Documentation ¶
Index ¶
- Constants
- func GetPlayers(w http.ResponseWriter, r *http.Request)
- func GetRounds(w http.ResponseWriter, r *http.Request)
- func GetWordHint(w http.ResponseWriter, r *http.Request)
- func SendDataToConnectedPlayers(sender *game.Player, lobby *game.Lobby, data interface{})
- func Serve(port int) error
- func TriggerComplexUpdateEvent(eventType string, data interface{}, lobby *game.Lobby)
- func TriggerComplexUpdatePerPlayerEvent(eventType string, data func(*game.Player) interface{}, lobby *game.Lobby)
- func TriggerSimpleUpdateEvent(eventType string, lobby *game.Lobby)
- func WriteAsJSON(player *game.Player, object interface{}) error
- func WritePublicSystemMessage(lobby *game.Lobby, text string)
- type CreatePageData
- type LobbyData
Constants ¶
View Source
const ( DrawingBoardBaseWidth = 1600 DrawingBoardBaseHeight = 900 )
Variables ¶
This section is empty.
Functions ¶
func GetPlayers ¶
func GetPlayers(w http.ResponseWriter, r *http.Request)
GetPlayers returns divs for all players in the lobby to the calling client.
func GetRounds ¶
func GetRounds(w http.ResponseWriter, r *http.Request)
GetRounds returns the html structure and data for the current round info.
func GetWordHint ¶
func GetWordHint(w http.ResponseWriter, r *http.Request)
GetWordHint returns the html structure and data for the current word hint.
func WriteAsJSON ¶
WriteAsJSON marshals the given input into a JSON string and sends it to the player using the currently established websocket connection.
Types ¶
type CreatePageData ¶
type CreatePageData struct { *game.SettingBounds Errors []string Languages map[string]string DrawingTime string Rounds string MaxPlayers string CustomWords string CustomWordsChance string ClientsPerIPLimit string EnableVotekick string Language string }
CreatePageData defines all non-static data for the lobby create page.
Click to show internal directories.
Click to hide internal directories.