Sample Move Request
A complete example of a request made to POST /move and a valid Battlesnake response to move up.

Request

POST https://your.battlesnake.server.com/move
1
{
2
"game": {
3
"id": "game-00fe20da-94ad-11ea-bb37",
4
"ruleset": {
5
"name": "standard",
6
"version": "v.1.2.3"
7
},
8
"timeout": 500
9
},
10
"turn": 14,
11
"board": {
12
"height": 11,
13
"width": 11,
14
"food": [
15
{"x": 5, "y": 5},
16
{"x": 9, "y": 0},
17
{"x": 2, "y": 6}
18
],
19
"hazards": [
20
{"x": 3, "y": 2}
21
],
22
"snakes": [
23
{
24
"id": "snake-508e96ac-94ad-11ea-bb37",
25
"name": "My Snake",
26
"health": 54,
27
"body": [
28
{"x": 0, "y": 0},
29
{"x": 1, "y": 0},
30
{"x": 2, "y": 0}
31
],
32
"latency": "111",
33
"head": {"x": 0, "y": 0},
34
"length": 3,
35
"shout": "why are we shouting??",
36
"squad": ""
37
},
38
{
39
"id": "snake-b67f4906-94ae-11ea-bb37",
40
"name": "Another Snake",
41
"health": 16,
42
"body": [
43
{"x": 5, "y": 4},
44
{"x": 5, "y": 3},
45
{"x": 6, "y": 3},
46
{"x": 6, "y": 2}
47
],
48
"latency": "222",
49
"head": {"x": 5, "y": 4},
50
"length": 4,
51
"shout": "I'm not really sure...",
52
"squad": ""
53
}
54
]
55
},
56
"you": {
57
"id": "snake-508e96ac-94ad-11ea-bb37",
58
"name": "My Snake",
59
"health": 54,
60
"body": [
61
{"x": 0, "y": 0},
62
{"x": 1, "y": 0},
63
{"x": 2, "y": 0}
64
],
65
"latency": "111",
66
"head": {"x": 0, "y": 0},
67
"length": 3,
68
"shout": "why are we shouting??",
69
"squad": ""
70
}
71
}
Copied!

Response

200 OK
1
{
2
"move": "up",
3
"shout": "I guess I'll go up then."
4
}
Copied!
Last modified 6mo ago
Copy link