sneks.engine.core.bearing module
- class sneks.engine.core.bearing.Bearing(x: int, y: int)
Bases:
objectRepresents the directional speeds of a snek. The speeds are represented as integers to show the vertical and horizontal speeds in cells per game tick.
Sneks start with a bearing of
(0, 0). For example, if the action fromget_next_action()isAction.UP, the snek will increase the speed vertically by one, so on the next game step the bearing will be(0, 1), and the snek will have moved one cell.- x: int
- y: int