Snek v0.4.0 Snek.Ruleset.Solo View Source

The solo ruleset, based on the official Battlesnake solo rules.

Solo rules are the same as Snek.Ruleset.Standard, except standard games end when there are fewer than 2 snakes remaining and solo games only end after the last remaining snake is eliminated.

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.