Documentation ¶
Overview ¶
Package api implements the Battlesnake API for hosting a Battlesnake. To host a Battlesnake, implement the Snek interface and serve it up with Router.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Battlesnake ¶
type Board ¶
type Board struct { Height int `json:"height"` Width int `json:"width"` Food []Point `json:"food"` Hazards []Point `json:"hazards"` Snakes []Battlesnake `json:"snakes"` }
type GameRequest ¶
type GameRequest struct { Game Game `json:"game"` Turn int `json:"turn"` Board Board `json:"board"` You Battlesnake `json:"you"` }
type InfoResponse ¶
type MoveResponse ¶
type State ¶
type State struct { Game Game Turn int Board Board Me Battlesnake }
State defines the game state on a given turn.
Everything else in this file is wireformat types explained at https://docs.battlesnake.com/references/api.
Click to show internal directories.
Click to hide internal directories.