Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 2.21 KB

starter-snakes.md

File metadata and controls

42 lines (29 loc) · 2.21 KB

Starter Snakes

There are a host of starter snakes to help you to get started building your first snake to compete in the Battlesnake tournament.

Each of the starter snakes have have enough scaffolding code to run a snake both locally and on heroku. Every snake that takes part in Battlesnake is an http server that will accept requests from the battlesnake engine.

Snakes has three ways of interacting with the engine.

  • start - A call from the engine to tell the snake a game has begun.
  • move - A call from the engine to tell the snake the current board state and request the next move.
  • end - A call from the engine to tell the snake that the game has completed.
  • ping - A call from the engine to keep your snake alive between games in case it gets hibernated by your cloud provider.

Each starter snake (should) also have three unit tests that you can run to ensure that these methods/functions are working.

Design Phylosophy

The target audience for the starter snakes is mainly junior programmers (but everyone is welcome to use them).

The Goals of them are to:

To help provide boilerplate, we should provide:

  • http server
  • json serialization/deserialization in the a structured/accessible format.

To help teach programming skills, we should:

  • avoid guiding the design of the code/logic.
  • avoid provide helper functions (beyond json/http-server code)

Official Starter Snakes

Currently the supported official starter snakes are in the following languages: