hirethissnake/2018

2018 API

Opened this issue · 0 comments

We need to update our snake (and therefore our server, display util, etc, to the new 2018 API. Unfortunately, it's not just a quick fix - there's quite a bit to change. I'll note some major changes below.

There's two ways I see of doing this update:

  1. do it ASAP: This would be painful since we'll be rewriting stuff we just wrote
  2. do it later (like on game day): This provides the major issue of bug fixing the day of while also not being able to use our tools.

Major changes:

  • /start request doesn't include board size, that's only in /move
  • every object in /move in now typed using an 'object' key/value pair
  • Snakes have an awful hierarchy. E.g. to get the snake's body it would be snake['data']['body']['data'] which is then still a list of dictionaries, each being a point

We'll also need to be able to process all these data hecka fast since it's a bottleneck before we can do anything.