AI-Project/survival/components/direction_component.py

13 lines
330 B
Python
Raw Normal View History

from survival.game.enums import Direction
2021-04-19 12:05:33 +02:00
class DirectionChangeComponent:
def __init__(self, direction):
self.direction = direction
def rotate_left(self):
self.direction = Direction.rotate_left(self.direction)
def rotate_right(self):
self.direction = Direction.rotate_right(self.direction)