sneks.engine.core.direction module

class sneks.engine.core.direction.Direction(*values)

Bases: Enum

An enumeration to provide directional values

UP = 'up'
DOWN = 'down'
LEFT = 'left'
RIGHT = 'right'
get_opposite() Direction

Gets the opposite direction of this direction

Returns:

the opposite direction

get_action() Action

Gets the corresponding action for the direction

Returns:

the action that corresponds to the direction