Snek v0.2.0 Snek.Ruleset.Standard View Source

The standard ruleset, based on the official Battlesnake rules.

Effort is made to keep this implementation compatible with Battlesnake's official rules, so that it may be used for simulating game turns. If there is a mistake either in the implementation or the tests/specification, please report it as a bug.

Link to this section Summary

Link to this section Functions

Callback implementation for Snek.Ruleset.done?/1.

Link to this function

init(board_size, snake_ids)

View Source

Callback implementation for Snek.Ruleset.init/2.

Link to this function

next(board, snake_moves, apple_spawn_chance \\ 0.15)

View Source

Callback implementation for Snek.Ruleset.next/3.