2021-06-19 00:09:14 +02:00
|
|
|
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)
|