0
5
Timeout: 20

Welcome to [game name here] API edition

Allowed methods:

API.height: The height of the board in rows
API.width: The width of the board in columns
API.coord: The location of the green snake.
Returns: [1, 2]
API.goal: The location of the blue goal square.
Returns: [4, 7]
API.walls: The location of the red wall squares.
Returns: [[5, 5], [8, 9]]
API.neighbours: Descriptions of all the adjacent squares.
Returns: {up: 'blank', right: 'edge', down: 'wall', left: 'goal'}
API.up(): Move the green snake up
API.right(): Move the green snake right
API.down(): Move the green snake down
API.left(): Move the green snake left

Your function:


Step Run (slow) Run (fast) Stop Reset