A Python implementation of the models in the Battlesnake webhook API.
import bottle
from random import choice
from bsapi.models import *
app = bottle.app()
@app.post('/move')
def move():
request = SnakeRequest(bottle.request.json)
return MoveResponse('left')
from flask import Flask
from bsapi.models import *
app = Flask(__name__)
@app.route('/move')
def move():
return MoveResponse('left')