27 lines
636 B
Python
27 lines
636 B
Python
|
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
|
||
|
|