Beta

SnakeInterface

In addition to the methods and attributes described in the overview, this interface provides the method and attributes below.

Methods

Method Returns Description
SnakeInterface.set_direction(direction: int) None Sets the direction the snake moves on the next tick. direction is one of N, E, S or W below.

Attributes

Name Type Value
SnakeInterface.N int 0
SnakeInterface.E int 1
SnakeInterface.S int 2
SnakeInterface.W int 3
SnakeInterface.WIDTH int 14, the number of columns
SnakeInterface.HEIGHT int 13, the number of rows