###live here!
api is exposed on client as a global, so you can script Ai's from your console!
- black mamba by jarofghosts
- bob by olivierrr
data.grid
{Array#2d}data.snakes
{Array}- contains all snakes coordinates and names
data.foods
{Array} food blocks within model- contains all food blocks coordinates
data.events
{Array}- each event object has a
type
and acoordinates
property - possible
type
s are:'snake-die'
triggered when you die'snake-eat'
triggered when your snake collides with a food block'snake-kill'
triggered when a snake (not yours) collides with your snake
- each event object has a
direction
{String}- can be 'UP' | 'RIGHT' | 'LEFT' | 'DOWN'
- spawns your snake at a random location
- your snake must be dead