Skip to content

Instantly share code, notes, and snippets.

function move(state) {
const head = state.you.body[0];
...
}
{
"game": {
"id": "game-id-string"
},
"turn": 1,
"board": {
"height": 11,
"width": 11,
"food": [{
"x": 1,
function move(state) {
console.log(state);
return { move: 'right' }
}
- - - - - - - - - - - - - - -
|0,0| | | | | |7,0|
 - - - - - - - - - - - - - - -
| | | | | | | |
 - - - - - - - - - - - - - - -
| | | | | | | |
 - - - - - - - - - - - - - - -
| | | | | | | |
 - - - - - - - - - - - - - - -
| | | | | | | |