Documentation ¶
Overview ¶
gioframework document
Index ¶
- type Cell
- type CellType
- type Client
- func (c *Client) Close()
- func (c *Client) GetReplays() []Replay
- func (c *Client) GetReplaysForUser(userID string) []Replay
- func (c *Client) Join1v1() *Game
- func (c *Client) JoinClassic() *Game
- func (c *Client) JoinCustomGame(ID string) *Game
- func (c *Client) JoinTeam(team string) *Game
- func (c *Client) Run() error
- type Game
- func (g *Game) Attack(from, to int, is50 bool)
- func (g *Game) GetAdjacents(from int) (adjacent []int)
- func (g *Game) GetDistance(from, to int) int
- func (g *Game) GetNeighborhood(from int) (adjacent []int)
- func (g *Game) QueueLength() int
- func (g *Game) SendChat(msg string)
- func (g *Game) SetForceStart(start bool)
- func (g *Game) Walkable(cell int) bool
- type GameUpdate
- type Ranking
- type Replay
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetReplays ¶
func (*Client) GetReplaysForUser ¶
func (*Client) JoinClassic ¶
func (*Client) JoinCustomGame ¶
type Game ¶
type Game struct { ID string QueueUpdate func(playercount, forcestartcount int) PreStart func() Start func(playerindex int, users []string) Update func(update GameUpdate) Won func() Lost func() Chat func(user int, message string) PlayerIndex int Width int Height int GameMap []Cell TurnCount int Scores []struct { Armies int `json:"total"` Tiles int `json:"tiles"` Index int `json:"i"` Dead bool `json:"dead"` } // contains filtered or unexported fields }
func (*Game) GetAdjacents ¶
func (*Game) GetDistance ¶
func (*Game) GetNeighborhood ¶
func (*Game) QueueLength ¶
func (*Game) SetForceStart ¶
type GameUpdate ¶
type GameUpdate struct { AttackIndex int `json:"attackIndex"` CitiesDiff []int `json:"cities_diff"` Generals []int `json:"generals"` MapDiff []int `json:"map_diff"` Scores []struct { Armies int `json:"total"` Tiles int `json:"tiles"` Index int `json:"i"` Dead bool `json:"dead"` } Stars *[]float64 `json:"stars"` Turn int `json:"turn"` }
Click to show internal directories.
Click to hide internal directories.