Change SnakeResponse.Latency to be a string. (#45)
Convert CLI Latency value from int to string, to match what the current game engine does.
This commit is contained in:
parent
c2c1c8df50
commit
d750b08317
1 changed files with 2 additions and 2 deletions
|
|
@ -37,7 +37,7 @@ type SnakeResponse struct {
|
|||
Name string `json:"name"`
|
||||
Health int32 `json:"health"`
|
||||
Body []Coord `json:"body"`
|
||||
Latency int32 `json:"latency"`
|
||||
Latency string `json:"latency"`
|
||||
Head Coord `json:"head"`
|
||||
Length int32 `json:"length"`
|
||||
Shout string `json:"shout"`
|
||||
|
|
@ -350,7 +350,7 @@ func snakeResponseFromSnake(snake rules.Snake) SnakeResponse {
|
|||
Name: Battlesnakes[snake.ID].Name,
|
||||
Health: snake.Health,
|
||||
Body: coordFromPointArray(snake.Body),
|
||||
Latency: 0,
|
||||
Latency: "0",
|
||||
Head: coordFromPoint(snake.Body[0]),
|
||||
Length: int32(len(snake.Body)),
|
||||
Shout: "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue