Documentation ¶
Index ¶
Constants ¶
View Source
const MoveCmd cg.CommandName = "move"
Clients send the move command to the server to signal a direction change of their paddle.
View Source
const PositionsEvent cg.EventName = "positions"
The positions event is sent to all players to tell them the positions of all objects in the game.
View Source
const ScoreEvent cg.EventName = "score"
The score event is sent to all players when a player scores a point.
View Source
const StartEvent cg.EventName = "start"
Is sent once the game starts.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GameConfig ¶
type GameConfig struct { }
type MoveCmdData ¶
type MoveCmdData struct { // The direction of the paddle movement. Direction Direction `json:"direction"` }
type PositionsEventData ¶
type ScoreEventData ¶
type StartEventData ¶
type StartEventData struct { // The side of the player. Side Side `json:"side"` }
Click to show internal directories.
Click to hide internal directories.