AI-Project/survival/components/direction_component.py
2021-06-19 00:09:14 +02:00

13 lines
330 B
Python

from survival.game.enums import Direction
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)