traktor/Trac.py

27 lines
636 B
Python
Raw Normal View History

2019-04-29 03:49:45 +02:00
from Point import Point
class Trac:
def __init__(self, rotation, position):
self.__position = Point(position.get_cord())
self.__rotation = rotation
def get_symbol(self):
if self.__rotation == 'S':
return 'v'
elif self.__rotation == 'N':
return '^'
elif self.__rotation == 'E':
return '>'
else:
return '<'
# def set_rotation(self, rotation):
# self.__rotation = rotation
# def set_position(self, position):
# self.__position.set_cord(position)
def get_position(self):
return self.__position